From 1808175f981433f474f14db31140344189770ba6 Mon Sep 17 00:00:00 2001 From: kjeremy Date: Mon, 23 Sep 2019 14:31:30 -0400 Subject: Drive by lints --- crates/ra_assists/src/ast_editor.rs | 2 +- crates/ra_assists/src/fill_match_arms.rs | 2 +- crates/ra_hir/src/code_model.rs | 2 +- crates/ra_hir/src/from_source.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'crates') diff --git a/crates/ra_assists/src/ast_editor.rs b/crates/ra_assists/src/ast_editor.rs index a710edce8..fd94d6960 100644 --- a/crates/ra_assists/src/ast_editor.rs +++ b/crates/ra_assists/src/ast_editor.rs @@ -19,7 +19,7 @@ pub struct AstEditor { } impl AstEditor { - pub fn new(node: N) -> AstEditor + pub fn new(node: N) -> Self where N: Clone, { diff --git a/crates/ra_assists/src/fill_match_arms.rs b/crates/ra_assists/src/fill_match_arms.rs index 543ed164c..f59062bb9 100644 --- a/crates/ra_assists/src/fill_match_arms.rs +++ b/crates/ra_assists/src/fill_match_arms.rs @@ -29,7 +29,7 @@ pub(crate) fn fill_match_arms(mut ctx: AssistCtx) -> Option::from_pieces( iter::once(pat), &AstBuilder::::unit(), diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 28002f740..12399c6ac 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs @@ -749,7 +749,7 @@ impl Const { db.const_data(self) } - pub fn name(&self, db: &impl HirDatabase) -> Option { + pub fn name(self, db: &impl HirDatabase) -> Option { self.data(db).name().cloned() } diff --git a/crates/ra_hir/src/from_source.rs b/crates/ra_hir/src/from_source.rs index c6ad85fc7..f3194595f 100644 --- a/crates/ra_hir/src/from_source.rs +++ b/crates/ra_hir/src/from_source.rs @@ -122,7 +122,7 @@ impl FromSource for StructField { .fields() .into_iter() .flat_map(|it| it.iter()) - .map(|(id, _)| StructField { parent: variant_def.clone(), id }) + .map(|(id, _)| StructField { parent: variant_def, id }) .find(|f| f.source(db) == src) } } -- cgit v1.2.3 From 13d7fc1620c7af448c9f234f806f4aee342b3948 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Mon, 23 Sep 2019 14:38:05 -0400 Subject: Revert Self --- crates/ra_assists/src/ast_editor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates') diff --git a/crates/ra_assists/src/ast_editor.rs b/crates/ra_assists/src/ast_editor.rs index fd94d6960..a710edce8 100644 --- a/crates/ra_assists/src/ast_editor.rs +++ b/crates/ra_assists/src/ast_editor.rs @@ -19,7 +19,7 @@ pub struct AstEditor { } impl AstEditor { - pub fn new(node: N) -> Self + pub fn new(node: N) -> AstEditor where N: Clone, { -- cgit v1.2.3