File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -564,9 +564,9 @@ impl CrateContext {
564
564
565
565
// Locate the crate's root source file relative to the package root normalized for unix
566
566
let crate_root =
567
- pathdiff:: diff_paths ( target. src_path . to_string ( ) , package_root) . map (
567
+ pathdiff:: diff_paths ( & target. src_path , package_root) . map (
568
568
// Normalize the path so that it always renders the same regardless of platform
569
- |root| root. to_string_lossy ( ) . replace ( " \\ " , "/" ) ,
569
+ |root| root. to_string_lossy ( ) . replace ( '\\' , "/" ) ,
570
570
) ;
571
571
572
572
// Conditionally check to see if the dependencies is a build-script target
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ impl<'a> SplicerKind<'a> {
96
96
!manifests. keys ( ) . any ( |path| {
97
97
let path_str = path. to_string_lossy ( ) . to_string ( ) ;
98
98
// Account for windows paths.
99
- let path_str = path_str. replace ( " \\ " , "/" ) ;
99
+ let path_str = path_str. replace ( '\\' , "/" ) ;
100
100
// Workspace members are represented as directories.
101
101
path_str. trim_end_matches ( "/Cargo.toml" ) . ends_with ( member)
102
102
} )
@@ -1015,7 +1015,7 @@ mod test {
1015
1015
// On windows, make sure we normalize the path to match what Cargo would
1016
1016
// otherwise use to populate metadata.
1017
1017
if cfg ! ( target_os = "windows" ) {
1018
- workspace_root = format ! ( "/{}" , workspace_root. replace( " \\ " , "/" ) )
1018
+ workspace_root = format ! ( "/{}" , workspace_root. replace( '\\' , "/" ) )
1019
1019
} ;
1020
1020
1021
1021
if is_root {
You can’t perform that action at this time.
0 commit comments