Rollup merge of #80509 - matthiaskrgr:ptr_arg, r=varkor
where possible, pass slices instead of &Vec or &String (clippy::ptr_arg)
This commit is contained in:
commit
41fa0dba27
13 changed files with 21 additions and 27 deletions
|
@ -417,7 +417,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
|||
// obviously it never weeds out ALL errors.
|
||||
fn process_errors(
|
||||
&self,
|
||||
errors: &Vec<RegionResolutionError<'tcx>>,
|
||||
errors: &[RegionResolutionError<'tcx>],
|
||||
) -> Vec<RegionResolutionError<'tcx>> {
|
||||
debug!("process_errors()");
|
||||
|
||||
|
@ -442,7 +442,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
|||
};
|
||||
|
||||
let mut errors = if errors.iter().all(|e| is_bound_failure(e)) {
|
||||
errors.clone()
|
||||
errors.to_owned()
|
||||
} else {
|
||||
errors.iter().filter(|&e| !is_bound_failure(e)).cloned().collect()
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue