From a425d7d871af7146f6ddc9ebc1c1da905867300e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 10 Jul 2020 23:57:10 +0200 Subject: [PATCH] Simplify --- crates/rust-analyzer/src/reload.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs index a81ecdf208..4e7d5be796 100644 --- a/crates/rust-analyzer/src/reload.rs +++ b/crates/rust-analyzer/src/reload.rs @@ -53,7 +53,7 @@ impl GlobalState { 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)) {