into_normalized

Function into_normalized 

Source
pub fn into_normalized(path: Utf8PathBuf) -> Utf8PathBuf
Expand description

Normalizes a path by:

  • Converting backslashes to forward slashes
  • Collapsing multiple consecutive slashes to single slashes
  • Removing single dots except at the start
  • Removing Windows-specific \\?\ prefix

The function performs a quick check to determine if normalization is actually needed. If no normalization is required, it returns the original path to avoid unnecessary allocations.