Simplify str and Path comparison.
This commit is contained in:
parent
7c7a5949fe
commit
0038430192
1 changed files with 1 additions and 1 deletions
|
|
@ -75,7 +75,7 @@ impl<'a> FileSearch<'a> {
|
|||
let files = files.filter_map(|p| p.ok().map(|s| s.path()))
|
||||
.collect::<Vec<_>>();
|
||||
fn is_rlib(p: &Path) -> bool {
|
||||
p.extension().and_then(|s| s.to_str()) == Some("rlib")
|
||||
p.extension() == Some("rlib".as_ref())
|
||||
}
|
||||
// Reading metadata out of rlibs is faster, and if we find both
|
||||
// an rlib and a dylib we only read one of the files of
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue