diff --git a/bindings/python/src/utils/normalization.rs b/bindings/python/src/utils/normalization.rs index 4cb3c7ce8..b67dcff9c 100644 --- a/bindings/python/src/utils/normalization.rs +++ b/bindings/python/src/utils/normalization.rs @@ -396,7 +396,7 @@ impl DestroyPtr for PyNormalizedStringRefMut { } impl PyNormalizedStringRefMut { - pub fn new(normalized: &mut NormalizedString) -> RefMutGuard { + pub fn new(normalized: &mut NormalizedString) -> RefMutGuard<'_, Self> { RefMutGuard::new(Self { inner: RefMutContainer::new(normalized), }) diff --git a/bindings/python/src/utils/pretokenization.rs b/bindings/python/src/utils/pretokenization.rs index 021a8ec90..70444aace 100644 --- a/bindings/python/src/utils/pretokenization.rs +++ b/bindings/python/src/utils/pretokenization.rs @@ -272,7 +272,7 @@ impl DestroyPtr for PyPreTokenizedStringRefMut { } impl PyPreTokenizedStringRefMut { - pub fn new(pretok: &mut tk::PreTokenizedString) -> RefMutGuard { + pub fn new(pretok: &mut tk::PreTokenizedString) -> 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 {