File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ impl std::fmt::Display for Info {
45
45
let username = if self . git_username == "" {
46
46
String :: from ( "" )
47
47
} else {
48
- String :: from ( format ! ( "{}:" , self . git_username) )
48
+ format ! ( "{}:" , self . git_username)
49
49
} ;
50
50
51
51
let git_info = format ! ( "{}{}" , username, self . git_version) ;
@@ -284,8 +284,7 @@ impl Info {
284
284
. arg ( "--version" )
285
285
. output ( )
286
286
. expect ( "Failed to execute git." ) ;
287
- let version = String :: from_utf8_lossy ( & version. stdout ) ;
288
- let version = version. to_string ( ) . replace ( '\n' , "" ) ;
287
+ let version = String :: from_utf8_lossy ( & version. stdout ) . replace ( '\n' , "" ) ;
289
288
290
289
let username = Command :: new ( "git" )
291
290
. arg ( "-C" )
@@ -295,8 +294,7 @@ impl Info {
295
294
. arg ( "user.name" )
296
295
. output ( )
297
296
. expect ( "Failed to execute git." ) ;
298
- let username = String :: from_utf8_lossy ( & username. stdout ) ;
299
- let username = username. to_string ( ) . replace ( '\n' , "" ) ;
297
+ let username = String :: from_utf8_lossy ( & username. stdout ) . replace ( '\n' , "" ) ;
300
298
( version, username)
301
299
}
302
300
You can’t perform that action at this time.
0 commit comments