From a425d7d871af7146f6ddc9ebc1c1da905867300e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 10 Jul 2020 23:57:10 +0200 Subject: 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 a81ecdf20..4e7d5be79 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)) { -- cgit v1.2.3