Skip to content

Commit

Permalink
fix: pyo3 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
benbrandt committed Nov 28, 2024
1 parent da7aad5 commit 9b3c4c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bindings/python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl ChunkSizer for CustomCallback {
fn size(&self, chunk: &str) -> usize {
Python::with_gil(|py| {
self.0
.call_bound(py, (chunk,), None)
.call(py, (chunk,), None)
.unwrap()
.extract::<usize>(py)
.unwrap()
Expand Down Expand Up @@ -127,10 +127,10 @@ impl<'text> ByteToCharOffsetTracker<'text> {
}

/// Allows for dynamically choosing between different chunk sizers
struct Sizer(Box<dyn ChunkSizer + 'static + Send>);
struct Sizer(Box<dyn ChunkSizer + 'static + Send + Sync>);

impl Sizer {
fn new(sizer: impl ChunkSizer + 'static + Send) -> Self {
fn new(sizer: impl ChunkSizer + 'static + Send + Sync) -> Self {
Self(Box::new(sizer))
}
}
Expand Down

0 comments on commit 9b3c4c5

Please sign in to comment.