needless clones
This commit is contained in:
parent
903bb97c17
commit
c57233abca
2 changed files with 3 additions and 3 deletions
|
|
@ -20,8 +20,8 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {
|
|||
|
||||
debug!("get_vtable(trait_ref={:?})", trait_ref);
|
||||
|
||||
let methods: Vec<_> = traits::supertraits(tcx, trait_ref.clone()).flat_map(|trait_ref| {
|
||||
match self.fulfill_obligation(trait_ref.clone()) {
|
||||
let methods: Vec<_> = traits::supertraits(tcx, trait_ref).flat_map(|trait_ref| {
|
||||
match self.fulfill_obligation(trait_ref) {
|
||||
// Should default trait error here?
|
||||
traits::VtableDefaultImpl(_) |
|
||||
traits::VtableBuiltin(_) => {
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@ impl<'a, 'tcx> Memory<'a, 'tcx> {
|
|||
Some(&FunctionDefinition {
|
||||
def_id,
|
||||
kind: FunctionKind::Closure { ref substs, ref ty }
|
||||
}) => Ok((def_id, substs.clone(), ty.clone())),
|
||||
}) => Ok((def_id, *substs, ty.clone())),
|
||||
Some(&FunctionDefinition {
|
||||
kind: FunctionKind::Function { .. }, ..
|
||||
}) => Err(EvalError::CalledClosureAsFunction),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue