Merge pull request #3661 from djrmarques/main

Changed the drain into into_iter on types.rs
This commit is contained in:
Jeong YunWon authored and GitHub committed 2022-04-26 15:49:29 +09:00
commit 94d377792f
1 file changed
+1 -1
+1 -1
View File
@@ -267,7 +267,7 @@ impl PyType {
fn dir(zelf: PyRef<Self>, vm: &VirtualMachine) -> PyList {
let attributes: Vec<PyObjectRef> = zelf
.get_attributes()
.drain(..)
.into_iter()
.map(|(k, _)| vm.ctx.new_str(k).into())
.collect();
PyList::from(attributes)