Avoid using to_vec to clone Vecs.
It's weird. `clone` is better.
This commit is contained in:
parent
f824083970
commit
e4bbfe8856
1 changed files with 2 additions and 2 deletions
|
|
@ -144,7 +144,7 @@ impl<'a, 'tcx> InspectCandidate<'a, 'tcx> {
|
|||
pub fn instantiate_nested_goals(&self, span: Span) -> Vec<InspectGoal<'a, 'tcx>> {
|
||||
let infcx = self.goal.infcx;
|
||||
let param_env = self.goal.goal.param_env;
|
||||
let mut orig_values = self.goal.orig_values.to_vec();
|
||||
let mut orig_values = self.goal.orig_values.clone();
|
||||
|
||||
let mut instantiated_goals = vec![];
|
||||
for step in &self.steps {
|
||||
|
|
@ -186,7 +186,7 @@ impl<'a, 'tcx> InspectCandidate<'a, 'tcx> {
|
|||
pub fn instantiate_impl_args(&self, span: Span) -> ty::GenericArgsRef<'tcx> {
|
||||
let infcx = self.goal.infcx;
|
||||
let param_env = self.goal.goal.param_env;
|
||||
let mut orig_values = self.goal.orig_values.to_vec();
|
||||
let mut orig_values = self.goal.orig_values.clone();
|
||||
|
||||
for step in &self.steps {
|
||||
match **step {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue