mirror of
https://github.com/nushell/nushell.git
synced 2025-08-16 17:51:42 +02:00
Clippy in tests (#10394)
Running `cargo clippy --workspace --tests` We should move that to CI as well
This commit is contained in:
committed by
GitHub
parent
a9a82de5c4
commit
19d732f313
@ -12,8 +12,8 @@ fn adjust_canonicalization<P: AsRef<Path>>(p: P) -> String {
|
||||
fn adjust_canonicalization<P: AsRef<Path>>(p: P) -> String {
|
||||
const VERBATIM_PREFIX: &str = r#"\\?\"#;
|
||||
let p = p.as_ref().display().to_string();
|
||||
if p.starts_with(VERBATIM_PREFIX) {
|
||||
p[VERBATIM_PREFIX.len()..].to_string()
|
||||
if let Some(stripped) = p.strip_prefix(VERBATIM_PREFIX) {
|
||||
stripped.to_string()
|
||||
} else {
|
||||
p
|
||||
}
|
||||
|
Reference in New Issue
Block a user