"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "crates/globset/src/pathutil.rs" between
ripgrep-12.1.1.tar.gz and ripgrep-13.0.0.tar.gz

About: ripgrep is a command line search tool ("rg") that tries to combine the usability of "ag" (an "ack" clone) with the raw speed of GNU "grep" (written in "Rust").

pathutil.rs  (ripgrep-12.1.1):pathutil.rs  (ripgrep-13.0.0)
skipping to change at line 63 skipping to change at line 63
let mut name = name.clone(); let mut name = name.clone();
name.drain_bytes(..last_dot_at); name.drain_bytes(..last_dot_at);
Cow::Owned(name) Cow::Owned(name)
} }
}) })
} }
/// Normalizes a path to use `/` as a separator everywhere, even on platforms /// Normalizes a path to use `/` as a separator everywhere, even on platforms
/// that recognize other characters as separators. /// that recognize other characters as separators.
#[cfg(unix)] #[cfg(unix)]
pub fn normalize_path(path: Cow<[u8]>) -> Cow<[u8]> { pub fn normalize_path(path: Cow<'_, [u8]>) -> Cow<'_, [u8]> {
// UNIX only uses /, so we're good. // UNIX only uses /, so we're good.
path path
} }
/// Normalizes a path to use `/` as a separator everywhere, even on platforms /// Normalizes a path to use `/` as a separator everywhere, even on platforms
/// that recognize other characters as separators. /// that recognize other characters as separators.
#[cfg(not(unix))] #[cfg(not(unix))]
pub fn normalize_path(mut path: Cow<[u8]>) -> Cow<[u8]> { pub fn normalize_path(mut path: Cow<[u8]>) -> Cow<[u8]> {
use std::path::is_separator; use std::path::is_separator;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)