@@ -117,7 +117,7 @@ pub fn run(
117117 table. printstd ( ) ;
118118 }
119119 ConfigArgs :: ListContexts { .. } => {
120- info ! ( "No available contexts. " ) ;
120+ info ! ( "No available contexts" ) ;
121121 }
122122 ConfigArgs :: AddContext {
123123 name,
@@ -139,17 +139,17 @@ pub fn run(
139139 ConfigArgs :: UseContext { name } => {
140140 if !config. set_current_context ( name) {
141141 return Err ( anyhow ! (
142- "No such context `{}` exists in `{}`. " ,
142+ "No such context `{}` exists in `{}`" ,
143143 name,
144144 config_path. as_ref( ) . display( ) ,
145145 ) ) ;
146146 } else {
147147 config:: write_reinfer_config ( config_path, & config) ?;
148- info ! ( "Switched to context `{}`. " , name) ;
148+ info ! ( "Switched to context `{}`" , name) ;
149149 }
150150 }
151151 ConfigArgs :: CurrentContext => config. get_current_context ( ) . map_or_else (
152- || info ! ( "There is no default context in use. " ) ,
152+ || info ! ( "There is no default context in use" ) ,
153153 |current_context| println ! ( "{}" , current_context. name) ,
154154 ) ,
155155 ConfigArgs :: GetToken { name } => match name. as_ref ( ) {
@@ -158,21 +158,21 @@ pub fn run(
158158 "{}" ,
159159 config
160160 . get_current_context( )
161- . ok_or_else( || anyhow!( "There is no default context in use. " ) ) ?
161+ . ok_or_else( || anyhow!( "There is no default context in use" ) ) ?
162162 . token
163163 . as_ref( )
164- . ok_or_else( || anyhow!( "The default context has no stored token. " ) ) ?
164+ . ok_or_else( || anyhow!( "The default context has no stored token" ) ) ?
165165 ) ;
166166 }
167167 Some ( name) => {
168168 println ! (
169169 "{}" ,
170170 config
171171 . get_context( name)
172- . ok_or_else( || anyhow!( "No such context `{}`. " , name) ) ?
172+ . ok_or_else( || anyhow!( "No such context `{}`" , name) ) ?
173173 . token
174174 . as_ref( )
175- . ok_or_else( || anyhow!( "The context `{}` has no stored token. " , name) ) ?
175+ . ok_or_else( || anyhow!( "The context `{}` has no stored token" , name) ) ?
176176 ) ;
177177 }
178178 } ,
@@ -181,13 +181,13 @@ pub fn run(
181181 if config. delete_context ( name) {
182182 config:: write_reinfer_config ( & config_path, & config) ?;
183183 info ! (
184- "Deleted context `{}` from `{}`. " ,
184+ "Deleted context `{}` from `{}`" ,
185185 name,
186186 config_path. as_ref( ) . display( )
187187 ) ;
188188 } else {
189189 return Err ( anyhow ! (
190- "No such context `{}` exists in `{}`. " ,
190+ "No such context `{}` exists in `{}`" ,
191191 name,
192192 config_path. as_ref( ) . display( )
193193 ) ) ;
@@ -216,15 +216,15 @@ fn add_or_edit_context(
216216 if !name. is_empty ( ) {
217217 break name;
218218 } else {
219- error ! ( "Context name cannot be empty. " ) ;
219+ error ! ( "Context name cannot be empty" ) ;
220220 }
221221 } ;
222222
223223 let existing_context = config. get_context ( & name) ;
224224 if existing_context. is_some ( ) {
225- info ! ( "Context `{}` already exists, it will be modified. " , name) ;
225+ info ! ( "Context `{}` already exists, it will be modified" , name) ;
226226 } else {
227- info ! ( "A new context `{}` will be created. " , name) ;
227+ info ! ( "A new context `{}` will be created" , name) ;
228228 }
229229
230230 // Get API token (either argument or from stdin)
@@ -239,7 +239,7 @@ fn add_or_edit_context(
239239 ) ) ;
240240 } else {
241241 warn ! (
242- "Be careful, API tokens are stored in cleartext in {}. " ,
242+ "Be careful, API tokens are stored in cleartext in {}" ,
243243 config_path. as_ref( ) . display( )
244244 ) ;
245245 }
@@ -281,16 +281,16 @@ fn add_or_edit_context(
281281 let update_existing = existing_context. is_some ( ) ;
282282 let is_new_context = !config. set_context ( context) ;
283283 if is_new_context && config. num_contexts ( ) == 1 {
284- info ! ( "Default context set to `{}`. " , name) ;
284+ info ! ( "Default context set to `{}`" , name) ;
285285 config. set_current_context ( & name) ;
286286 }
287287
288288 config:: write_reinfer_config ( config_path, & config) ?;
289289
290290 if update_existing {
291- info ! ( "Context `{}` was updated. " , name) ;
291+ info ! ( "Context `{}` was updated" , name) ;
292292 } else {
293- info ! ( "New context `{}` was created. " , name) ;
293+ info ! ( "New context `{}` was created" , name) ;
294294 }
295295
296296 Ok ( ( ) )
0 commit comments