From 82d6cfd495c7e0f230ce1ac61e7a4297fa22f02f Mon Sep 17 00:00:00 2001 From: kjeremy Date: Wed, 30 Sep 2020 15:22:49 -0400 Subject: Minor clippy performance suggestions --- crates/ide/src/link_rewrite.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ide') diff --git a/crates/ide/src/link_rewrite.rs b/crates/ide/src/link_rewrite.rs index 107787bb9..a16f90e17 100644 --- a/crates/ide/src/link_rewrite.rs +++ b/crates/ide/src/link_rewrite.rs @@ -120,7 +120,7 @@ fn rewrite_intra_doc_link( /// Try to resolve path to local documentation via path-based links (i.e. `../gateway/struct.Shard.html`). fn rewrite_url_link(db: &RootDatabase, def: ModuleDef, target: &str) -> Option { - if !(target.contains("#") || target.contains(".html")) { + if !(target.contains('#') || target.contains(".html")) { return None; } @@ -190,7 +190,7 @@ fn strip_prefixes_suffixes(mut s: &str) -> &str { prefixes.clone().for_each(|prefix| s = s.trim_start_matches(*prefix)); suffixes.clone().for_each(|suffix| s = s.trim_end_matches(*suffix)); }); - s.trim_start_matches("@").trim() + s.trim_start_matches('@').trim() } static TYPES: ([&str; 7], [&str; 0]) = -- cgit v1.2.3