Skip to content

Commit

Permalink
pyo3: migrate to Bound smart ptr for src/externs/stdio.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
tdyas committed Oct 2, 2024
1 parent 7a5c2cd commit 52727fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rust/engine/src/externs/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ impl PyStdioRead {
.map_err(PyException::new_err)
}

fn readinto(&self, obj: &PyAny, py: Python) -> PyResult<usize> {
let py_buffer = PyBuffer::get(obj)?;
fn readinto(&self, obj: &Bound<'_, PyAny>, py: Python) -> PyResult<usize> {
let py_buffer = PyBuffer::get_bound(obj)?;
let mut buffer = vec![0; py_buffer.len_bytes()];
let read = py
.allow_threads(|| stdio::get_destination().read_stdin(&mut buffer))
Expand Down

0 comments on commit 52727fb

Please sign in to comment.