diff --git a/crates/ra_hir_ty/src/display.rs b/crates/ra_hir_ty/src/display.rs index 23cea1a2ad7..ac68c5661ed 100644 --- a/crates/ra_hir_ty/src/display.rs +++ b/crates/ra_hir_ty/src/display.rs @@ -369,7 +369,7 @@ impl HirDisplay for ApplicationTy { let data = (*datas) .as_ref() .map(|rpit| rpit.impl_traits[idx as usize].bounds.clone()); - data.clone().subst(&self.parameters) + data.subst(&self.parameters) } }; write!(f, "impl ")?; @@ -456,7 +456,7 @@ impl HirDisplay for Ty { let data = (*datas) .as_ref() .map(|rpit| rpit.impl_traits[idx as usize].bounds.clone()); - data.clone().subst(&opaque_ty.parameters) + data.subst(&opaque_ty.parameters) } }; write!(f, "impl ")?; diff --git a/crates/ra_hir_ty/src/infer/expr.rs b/crates/ra_hir_ty/src/infer/expr.rs index 22884522a84..06baac2a9b8 100644 --- a/crates/ra_hir_ty/src/infer/expr.rs +++ b/crates/ra_hir_ty/src/infer/expr.rs @@ -85,10 +85,8 @@ impl<'a> InferenceContext<'a> { ctor: TypeCtor::Tuple { cardinality: num_args as u16 }, parameters, }); - let substs = Substs::build_for_generics(&generic_params) - .push(ty.clone()) - .push(arg_ty.clone()) - .build(); + let substs = + Substs::build_for_generics(&generic_params).push(ty.clone()).push(arg_ty).build(); let trait_env = Arc::clone(&self.trait_env); let implements_fn_trait = diff --git a/crates/ra_hir_ty/src/lib.rs b/crates/ra_hir_ty/src/lib.rs index 7f3f5e77155..c12bed4af33 100644 --- a/crates/ra_hir_ty/src/lib.rs +++ b/crates/ra_hir_ty/src/lib.rs @@ -891,7 +891,7 @@ impl Ty { let data = (*it) .as_ref() .map(|rpit| rpit.impl_traits[idx as usize].bounds.clone()); - data.clone().subst(&opaque_ty.parameters) + data.subst(&opaque_ty.parameters) }) } }; diff --git a/crates/ra_hir_ty/src/lower.rs b/crates/ra_hir_ty/src/lower.rs index 0fa0f7908c3..3af8d55a1ba 100644 --- a/crates/ra_hir_ty/src/lower.rs +++ b/crates/ra_hir_ty/src/lower.rs @@ -720,8 +720,7 @@ fn assoc_type_bindings_from_type_bound<'a>( None => return SmallVec::<[GenericPredicate; 1]>::new(), Some(t) => t, }; - let projection_ty = - ProjectionTy { associated_ty, parameters: super_trait_ref.substs.clone() }; + let projection_ty = ProjectionTy { associated_ty, parameters: super_trait_ref.substs }; let mut preds = SmallVec::with_capacity( binding.type_ref.as_ref().map_or(0, |_| 1) + binding.bounds.len(), ); diff --git a/crates/ra_syntax/src/ast/edit.rs b/crates/ra_syntax/src/ast/edit.rs index 2ef173a0397..940c30c7fb9 100644 --- a/crates/ra_syntax/src/ast/edit.rs +++ b/crates/ra_syntax/src/ast/edit.rs @@ -299,12 +299,8 @@ impl ast::UseTree { Some(it) => it, None => return self.clone(), }; - let use_tree = make::use_tree( - suffix.clone(), - self.use_tree_list(), - self.alias(), - self.star_token().is_some(), - ); + let use_tree = + make::use_tree(suffix, self.use_tree_list(), self.alias(), self.star_token().is_some()); let nested = make::use_tree_list(iter::once(use_tree)); return make::use_tree(prefix.clone(), Some(nested), None, false); diff --git a/crates/test_utils/src/fixture.rs b/crates/test_utils/src/fixture.rs index fad8f7e2cc6..ed764046b60 100644 --- a/crates/test_utils/src/fixture.rs +++ b/crates/test_utils/src/fixture.rs @@ -62,7 +62,7 @@ impl Fixture { let components = meta.split_ascii_whitespace().collect::>(); let path = components[0].to_string(); - assert!(path.starts_with("/")); + assert!(path.starts_with('/')); let mut krate = None; let mut deps = Vec::new(); diff --git a/docs/dev/README.md b/docs/dev/README.md index f8746240047..3af01cd6b7d 100644 --- a/docs/dev/README.md +++ b/docs/dev/README.md @@ -314,7 +314,7 @@ We don't have specific rules around git history hygiene. Maintaining clean git history is encouraged, but not enforced. We use rebase workflow, it's OK to rewrite history during PR review process. -Avoid @mentioning people in commit messages, as such messages create a lot of duplicate notification traffic during rebases. +Avoid @mentioning people in commit messages and pull request descriptions (they are added to commit message by bors), as such messages create a lot of duplicate notification traffic during rebases. # Architecture Invariants diff --git a/editors/code/tests/unit/index.ts b/editors/code/tests/unit/index.ts index 5165720b458..b7d8d21448c 100644 --- a/editors/code/tests/unit/index.ts +++ b/editors/code/tests/unit/index.ts @@ -1,6 +1,6 @@ import * as path from 'path'; -import Mocha from 'mocha'; -import glob from 'glob'; +import * as Mocha from 'mocha'; +import * as glob from 'glob'; export function run(): Promise { // Create the mocha test diff --git a/editors/code/tsconfig.json b/editors/code/tsconfig.json index 32d1a865f0a..c9f348241a3 100644 --- a/editors/code/tsconfig.json +++ b/editors/code/tsconfig.json @@ -6,8 +6,6 @@ "lib": [ "es2019" ], - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, "sourceMap": true, "rootDir": ".", "strict": true,