mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Merge pull request #3661 from djrmarques/main
Changed the drain into into_iter on types.rs
This commit is contained in:
1 file changed
+1
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user