mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
Introduce AsPyObject to replace IdProtocol
This commit is contained in:
@@ -85,9 +85,8 @@ impl<'vm> ShellHelper<'vm> {
|
||||
} else {
|
||||
// we need to get a variable based off of globals/builtins
|
||||
|
||||
let globals = str_iter_method(self.globals.as_object().to_owned(), "keys").ok()?;
|
||||
let builtins =
|
||||
str_iter_method(self.vm.builtins.as_object().to_owned(), "__dir__").ok()?;
|
||||
let globals = str_iter_method(self.globals.clone().into(), "keys").ok()?;
|
||||
let builtins = str_iter_method(self.vm.builtins.clone().into(), "__dir__").ok()?;
|
||||
(first, globals, Some(builtins))
|
||||
};
|
||||
Some((word_start, iter1.chain(iter2.into_iter().flatten())))
|
||||
|
||||
Reference in New Issue
Block a user