diff --git a/Cargo.toml b/Cargo.toml index c4e0265..2842bb7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["Jason Kiniry "] name = "pathext" -version = "0.1.5" +version = "0.1.6" edition = "2021" license = "MIT OR Apache-2.0" homepage = "https://github.com/jtk18/pathext" diff --git a/src/lib.rs b/src/lib.rs index 0ca7450..2c5acc2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,7 +38,9 @@ pub trait PathExt { /// I think this is the only implementation needed since there is a lot that implements AsRef in std. impl> PathExt for T { fn contains(&self, pattern: &str) -> bool { - self.as_ref().to_str().map_or(false, |s| s.contains(pattern)) + self.as_ref() + .to_str() + .map_or(false, |s| s.contains(pattern)) } fn has_component(&self, component: &str) -> bool { @@ -202,8 +204,8 @@ mod tests { vec![ ("/usr/local", "aardvark"), ("/usr/", "local/aardvark"), - ("/repos/local/", "/usr/local/aardvark") - ] + ("/repos/local/", "/usr/local/aardvark"), + ], )]; for test_case in tests {