Skip to content

Commit b59e827

Browse files
committed
refactor: make local function invisible
1 parent 392db56 commit b59e827

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/cargo/core/compiler/output_depinfo.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ use log::debug;
1313

1414
/// Bacially just normalizes a given path and converts it to a string.
1515
fn render_filename<P: AsRef<Path>>(path: P, basedir: Option<&str>) -> CargoResult<String> {
16+
fn wrap_path(path: &Path) -> CargoResult<String> {
17+
path.to_str()
18+
.ok_or_else(|| internal(format!("path `{:?}` not utf-8", path)))
19+
.map(|f| f.replace(" ", "\\ "))
20+
}
21+
1622
let path = path.as_ref();
1723
if let Some(basedir) = basedir {
1824
let norm_path = normalize_path(path);
@@ -26,12 +32,6 @@ fn render_filename<P: AsRef<Path>>(path: P, basedir: Option<&str>) -> CargoResul
2632
}
2733
}
2834

29-
fn wrap_path(path: &Path) -> CargoResult<String> {
30-
path.to_str()
31-
.ok_or_else(|| internal(format!("path `{:?}` not utf-8", path)))
32-
.map(|f| f.replace(" ", "\\ "))
33-
}
34-
3535
/// Collects all dependencies of the `unit` for the output dep info file.
3636
///
3737
/// Dependencies will be stored in `deps`, including:

0 commit comments

Comments
 (0)