Skip to content

Commit 0038430

Browse files
committed
Simplify str and Path comparison.
1 parent 7c7a594 commit 0038430

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/session/filesearch.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ impl<'a> FileSearch<'a> {
7575
let files = files.filter_map(|p| p.ok().map(|s| s.path()))
7676
.collect::<Vec<_>>();
7777
fn is_rlib(p: &Path) -> bool {
78-
p.extension().and_then(|s| s.to_str()) == Some("rlib")
78+
p.extension() == Some("rlib".as_ref())
7979
}
8080
// Reading metadata out of rlibs is faster, and if we find both
8181
// an rlib and a dylib we only read one of the files of

0 commit comments

Comments
 (0)