]> git.lizzy.rs Git - rust.git/commitdiff
Simplify
authorAleksey Kladov <aleksey.kladov@gmail.com>
Fri, 10 Jul 2020 21:57:10 +0000 (23:57 +0200)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Fri, 10 Jul 2020 21:57:10 +0000 (23:57 +0200)
crates/rust-analyzer/src/reload.rs

index a81ecdf208141261134ebe3819602dc5225ff2c7..4e7d5be7968f2b8ebdc2ce15875ddfbc44a6b560 100644 (file)
@@ -53,7 +53,7 @@ fn is_interesting(path: &AbsPath, change_kind: ChangeKind) -> bool {
             if change_kind == ChangeKind::Modify {
                 return false;
             }
-            if path.extension().map(|it| it.to_str()) != Some("rs".into()) {
+            if path.extension().unwrap_or_default() != "rs" {
                 return false;
             }
             if IMPLICIT_TARGET_FILES.iter().any(|it| path.ends_with(it)) {