🌐 AI搜索 & 代理 主页
Skip to content

Commit 5eff482

Browse files
committed
Fix compile error, sorry
1 parent 9268e08 commit 5eff482

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/module_injection.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use rustpython_vm as vm;
1+
use rustpython::vm::*;
22
use rustpython_vm::builtins::PyModule;
33

44
/// A global fn called from Python which extracts the id from the injected module and returns / prints it to the console.
@@ -14,7 +14,7 @@ fn get_id(vm: &vm::VirtualMachine) -> PyResult<i32> {
1414
Ok(id)
1515
}
1616

17-
fn main() -> vm::PyResult<()> {
17+
fn main() -> PyResult<()> {
1818
vm::Interpreter::without_stdlib(Default::default()).enter(|vm| {
1919
let scope = vm.new_scope_with_builtins();
2020

@@ -37,7 +37,7 @@ fn main() -> vm::PyResult<()> {
3737
// Execute the code
3838
let source = r#"get_id()"#;
3939
let code_obj = vm
40-
.compile(source, vm::compiler::Mode::Exec, "<embedded>".to_owned())
40+
.compile(source, compiler::Mode::Exec, "<embedded>".to_owned())
4141
.map_err(|err| vm.new_syntax_error(&err, Some(source)))?;
4242

4343
vm.run_code_obj(code_obj, scope)?;

0 commit comments

Comments
 (0)