From 8ab0c7ffd3f976272caa65b00220d016f6018d8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Mon, 6 Jul 2020 13:59:24 +0300 Subject: Don't ping people in PRs --- docs/dev/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dev/README.md b/docs/dev/README.md index f87462400..b6a00df18 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, as such messages create a lot of duplicate notification traffic during rebases. # Architecture Invariants -- cgit v1.2.3 From 9209a992c9fa8a9421466f8119aa121fee2223e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Mon, 6 Jul 2020 14:29:19 +0300 Subject: Disable ES module interop --- editors/code/tests/unit/index.ts | 4 ++-- editors/code/tsconfig.json | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/editors/code/tests/unit/index.ts b/editors/code/tests/unit/index.ts index 5165720b4..b7d8d2144 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 32d1a865f..c9f348241 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, -- cgit v1.2.3 From ebdee366b0e16d1d019db2f5c22a730b4451194f Mon Sep 17 00:00:00 2001 From: kjeremy Date: Mon, 6 Jul 2020 17:13:55 -0400 Subject: Clippy perf warnings Removes redundant clones --- crates/ra_hir_ty/src/display.rs | 4 ++-- crates/ra_hir_ty/src/infer/expr.rs | 6 ++---- crates/ra_hir_ty/src/lib.rs | 2 +- crates/ra_hir_ty/src/lower.rs | 3 +-- crates/ra_syntax/src/ast/edit.rs | 8 ++------ crates/test_utils/src/fixture.rs | 2 +- 6 files changed, 9 insertions(+), 16 deletions(-) diff --git a/crates/ra_hir_ty/src/display.rs b/crates/ra_hir_ty/src/display.rs index 23cea1a2a..ac68c5661 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 22884522a..06baac2a9 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 7f3f5e771..c12bed4af 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 3dc154e92..01af3187b 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 2ef173a03..940c30c7f 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 fad8f7e2c..ed764046b 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(); -- cgit v1.2.3 From c88d85bbb497ccf58faf219178ea3cb8b88d3cd5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 7 Jul 2020 11:23:59 +0200 Subject: Update docs/dev/README.md --- docs/dev/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dev/README.md b/docs/dev/README.md index b6a00df18..3af01cd6b 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 and pull request descriptions, 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 -- cgit v1.2.3