We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
path::normalize
1 parent 6c1d184 commit 9e0df8dCopy full SHA for 9e0df8d
src/path.rs
@@ -7,10 +7,7 @@ use std::ffi::OsStr;
7
use std::path::{Component, MAIN_SEPARATOR_STR, Path, PathBuf};
8
9
/// Normalizes a given path by removing redundant components.
10
-/// The given path must be absolute (e.g. by joining it with the current working directory).
11
pub fn normalize(path: &Path) -> PathBuf {
12
- debug_assert!(path.is_absolute());
13
-
14
let mut res = PathBuf::with_capacity(path.as_os_str().len());
15
let mut root_len = 0;
16
0 commit comments