From 17f4d27f1285a76961b2e3957dc192de8e4f179f Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Sun, 19 Jul 2020 14:26:24 -0400 Subject: Minor perf tweaks per clippy --- crates/ra_assists/src/handlers/raw_string.rs | 2 +- crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_assists') diff --git a/crates/ra_assists/src/handlers/raw_string.rs b/crates/ra_assists/src/handlers/raw_string.rs index ba1dcb610..4e8a0c2db 100644 --- a/crates/ra_assists/src/handlers/raw_string.rs +++ b/crates/ra_assists/src/handlers/raw_string.rs @@ -131,7 +131,7 @@ pub(crate) fn remove_hash(acc: &mut Assists, ctx: &AssistContext) -> Option<()> let token = ctx.find_token_at_offset(RAW_STRING).and_then(ast::RawString::cast)?; let text = token.text().as_str(); - if !text.starts_with("r#") && text.ends_with("#") { + if !text.starts_with("r#") && text.ends_with('#') { return None; } diff --git a/crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs b/crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs index dfd314abf..3d51faa54 100644 --- a/crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs +++ b/crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs @@ -106,7 +106,7 @@ fn maybe_replace_path( path: ast::Path, target: ast::Path, ) -> Option<()> { - if !path_eq(path.clone(), target.clone()) { + if !path_eq(path.clone(), target) { return None; } -- cgit v1.2.3