diff --git a/bindings/python/src/utils/normalization.rs b/bindings/python/src/utils/normalization.rs index b67dcff9c..fd1445efd 100644 --- a/bindings/python/src/utils/normalization.rs +++ b/bindings/python/src/utils/normalization.rs @@ -1,5 +1,5 @@ use super::regex::PyRegex; -use super::{DestroyPtr, RefMutContainer, RefMutGuard}; +use super::{DestroyPtr, RefMutContainer}; use crate::error::ToPyResult; use pyo3::exceptions; use pyo3::prelude::*; @@ -396,8 +396,8 @@ impl DestroyPtr for PyNormalizedStringRefMut { } impl PyNormalizedStringRefMut { - pub fn new(normalized: &mut NormalizedString) -> RefMutGuard<'_, Self> { - RefMutGuard::new(Self { + pub fn new(normalized: &mut NormalizedString) -> super::RefMutGuard<'_, Self> { + super::RefMutGuard::new(Self { inner: RefMutContainer::new(normalized), }) } diff --git a/bindings/python/src/utils/pretokenization.rs b/bindings/python/src/utils/pretokenization.rs index 70444aace..7857c0fe1 100644 --- a/bindings/python/src/utils/pretokenization.rs +++ b/bindings/python/src/utils/pretokenization.rs @@ -4,9 +4,7 @@ use pyo3::exceptions; use pyo3::prelude::*; use pyo3::types::*; -use super::{ - DestroyPtr, PyNormalizedString, PyNormalizedStringRefMut, RefMutContainer, RefMutGuard, -}; +use super::{DestroyPtr, PyNormalizedString, PyNormalizedStringRefMut, RefMutContainer}; use crate::encoding::PyEncoding; use crate::error::ToPyResult; use crate::token::PyToken; @@ -272,10 +270,10 @@ impl DestroyPtr for PyPreTokenizedStringRefMut { } impl PyPreTokenizedStringRefMut { - pub fn new(pretok: &mut tk::PreTokenizedString) -> RefMutGuard<'_, Self> { + pub fn new(pretok: &mut tk::PreTokenizedString) -> super::RefMutGuard<'_, Self> { // SAFETY: This is safe because we return a RefMutGuard here. // The compiler will make sure the &mut stays valid as necessary. - RefMutGuard::new(Self { + super::RefMutGuard::new(Self { inner: RefMutContainer::new(pretok), }) }