Skip to content

Commit

Permalink
examples/plugin: fix to use Bound (#4525)
Browse files Browse the repository at this point in the history
  • Loading branch information
birkenfeld authored Sep 4, 2024
1 parent 3d5d408 commit 286ddab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/plugin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
//do useful work
Python::with_gil(|py| {
//add the current directory to import path of Python (do not use this in production!)
let syspath: &PyList = py.import("sys")?.getattr("path")?.extract()?;
let syspath: Bound<PyList> = py.import("sys")?.getattr("path")?.extract()?;
syspath.insert(0, &path)?;
println!("Import path is: {:?}", syspath);

Expand Down

0 comments on commit 286ddab

Please sign in to comment.