mirror of
https://github.com/denoland/deno.git
synced 2024-12-03 17:08:35 -05:00
chore(ext/node): fix variable name (#17948)
This commit is contained in:
parent
5149d07335
commit
b3b6b53df9
1 changed files with 3 additions and 3 deletions
|
@ -3,7 +3,7 @@
|
||||||
use std::path::Component;
|
use std::path::Component;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
/// Extenion to path_clean::PathClean
|
/// Extension to path_clean::PathClean
|
||||||
pub trait PathClean<T> {
|
pub trait PathClean<T> {
|
||||||
fn clean(&self) -> T;
|
fn clean(&self) -> T;
|
||||||
}
|
}
|
||||||
|
@ -22,8 +22,8 @@ impl PathClean<PathBuf> for PathBuf {
|
||||||
// skip
|
// skip
|
||||||
}
|
}
|
||||||
Component::ParentDir => {
|
Component::ParentDir => {
|
||||||
let poped_component = components.pop();
|
let maybe_last_component = components.pop();
|
||||||
if !matches!(poped_component, Some(Component::Normal(_))) {
|
if !matches!(maybe_last_component, Some(Component::Normal(_))) {
|
||||||
panic!("Error normalizing: {}", path.display());
|
panic!("Error normalizing: {}", path.display());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue