]> git.lizzy.rs Git - rust.git/blobdiff - crates/rust-analyzer/src/reload.rs
Simplify
[rust.git] / 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)) {