Skip to content

Commit

Permalink
Simplify str and Path comparison.
Browse files Browse the repository at this point in the history
  • Loading branch information
frewsxcv committed Oct 10, 2016
1 parent 7c7a594 commit 0038430
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc/session/filesearch.rs
Expand Up @@ -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
Expand Down

0 comments on commit 0038430

Please sign in to comment.