diff --git a/vm/src/builtins/type.rs b/vm/src/builtins/type.rs index 3be8906471..f1e9193e71 100644 --- a/vm/src/builtins/type.rs +++ b/vm/src/builtins/type.rs @@ -267,7 +267,7 @@ impl PyType { fn dir(zelf: PyRef, vm: &VirtualMachine) -> PyList { let attributes: Vec = zelf .get_attributes() - .drain(..) + .into_iter() .map(|(k, _)| vm.ctx.new_str(k).into()) .collect(); PyList::from(attributes)