From 9e0df8d5cdf2ceab0ec442f9af45e5cfcffa00b3 Mon Sep 17 00:00:00 2001 From: rhysd Date: Fri, 30 May 2025 18:49:11 +0900 Subject: [PATCH] Allow `path::normalize` to normalize relative paths --- src/path.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/path.rs b/src/path.rs index 45ba6accd41b..e31d1f89df74 100644 --- a/src/path.rs +++ b/src/path.rs @@ -7,10 +7,7 @@ use std::ffi::OsStr; use std::path::{Component, MAIN_SEPARATOR_STR, Path, PathBuf}; /// Normalizes a given path by removing redundant components. -/// The given path must be absolute (e.g. by joining it with the current working directory). pub fn normalize(path: &Path) -> PathBuf { - debug_assert!(path.is_absolute()); - let mut res = PathBuf::with_capacity(path.as_os_str().len()); let mut root_len = 0;