5235: Don't ping people in PRs r=matklad a=lnicola 5236: Disable ES module interop r=matklad a=lnicola 5241: Clippy perf warnings r=matklad a=kjeremy Removes redundant clones Co-authored-by: Laurențiu Nicola <lnicola@dend.ro> Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com> Co-authored-by: kjeremy <kjeremy@gmail.com>
This commit is contained in:
commit
0f5d62a3f3
@ -369,7 +369,7 @@ fn hir_fmt(&self, f: &mut HirFormatter) -> Result<(), HirDisplayError> {
|
||||
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 @@ fn hir_fmt(&self, f: &mut HirFormatter) -> Result<(), HirDisplayError> {
|
||||
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 ")?;
|
||||
|
@ -85,10 +85,8 @@ fn callable_sig_from_fn_trait(&mut self, ty: &Ty, num_args: usize) -> Option<(Ve
|
||||
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 =
|
||||
|
@ -891,7 +891,7 @@ pub fn impl_trait_bounds(&self, db: &dyn HirDatabase) -> Option<Vec<GenericPredi
|
||||
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)
|
||||
})
|
||||
}
|
||||
};
|
||||
|
@ -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(),
|
||||
);
|
||||
|
@ -299,12 +299,8 @@ pub fn split_prefix(&self, prefix: &ast::Path) -> 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);
|
||||
|
||||
|
@ -62,7 +62,7 @@ fn parse_meta_line(meta: &str) -> Fixture {
|
||||
let components = meta.split_ascii_whitespace().collect::<Vec<_>>();
|
||||
|
||||
let path = components[0].to_string();
|
||||
assert!(path.starts_with("/"));
|
||||
assert!(path.starts_with('/'));
|
||||
|
||||
let mut krate = None;
|
||||
let mut deps = Vec::new();
|
||||
|
@ -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
|
||||
|
||||
|
@ -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<void> {
|
||||
// Create the mocha test
|
||||
|
@ -6,8 +6,6 @@
|
||||
"lib": [
|
||||
"es2019"
|
||||
],
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"sourceMap": true,
|
||||
"rootDir": ".",
|
||||
"strict": true,
|
||||
|
Loading…
Reference in New Issue
Block a user