File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -322,8 +322,8 @@ impl Execs {
322322 Ok ( actual) => actual,
323323 } ;
324324 // Let's not deal with \r\n vs \n on windows...
325- let actual = actual. replace ( " \r " , "" ) ;
326- let actual = actual. replace ( " \t " , "<tab>" ) ;
325+ let actual = actual. replace ( '\r' , "" ) ;
326+ let actual = actual. replace ( '\t' , "<tab>" ) ;
327327
328328 match kind {
329329 MatchKind :: Exact => {
@@ -515,8 +515,8 @@ enum MatchKind {
515515/// See `substitute_macros` for a complete list of macros.
516516pub fn lines_match ( expected : & str , actual : & str ) -> bool {
517517 // Let's not deal with / vs \ (windows...)
518- let expected = expected. replace ( " \\ " , "/" ) ;
519- let mut actual: & str = & actual. replace ( " \\ " , "/" ) ;
518+ let expected = expected. replace ( '\\' , "/" ) ;
519+ let mut actual: & str = & actual. replace ( '\\' , "/" ) ;
520520 let expected = substitute_macros ( & expected) ;
521521 for ( i, part) in expected. split ( "[..]" ) . enumerate ( ) {
522522 match actual. find ( part) {
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ mod os {
6060 let profiles = determine_profiles ( ) ?;
6161
6262 let found_profile = profiles. into_iter ( ) . fold ( false , |prev, profile| {
63- let contents = read_profile_without_volta ( & profile) . unwrap_or_else ( String :: new ) ;
63+ let contents = read_profile_without_volta ( & profile) . unwrap_or_default ( ) ;
6464
6565 let write_profile = match profile. extension ( ) {
6666 Some ( ext) if ext == "fish" => write_profile_fish,
You can’t perform that action at this time.
0 commit comments