X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=crates%2Frust-analyzer%2Fsrc%2Freload.rs;h=4e7d5be7968f2b8ebdc2ce15875ddfbc44a6b560;hb=a425d7d871af7146f6ddc9ebc1c1da905867300e;hp=a81ecdf208141261134ebe3819602dc5225ff2c7;hpb=6c920d9ac80fca5de3c5c536107c1e14580cae85;p=rust.git diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs index a81ecdf2081..4e7d5be7968 100644 --- a/crates/rust-analyzer/src/reload.rs +++ b/crates/rust-analyzer/src/reload.rs @@ -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)) {