Skip to content

Commit

Permalink
refactor: do not elide lifetimes as in Rust 2018
Browse files Browse the repository at this point in the history
  • Loading branch information
sftse committed Oct 22, 2024
1 parent 6eb38d8 commit cf98458
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bindings/python/src/utils/normalization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ impl DestroyPtr for PyNormalizedStringRefMut {
}

impl PyNormalizedStringRefMut {
pub fn new(normalized: &mut NormalizedString) -> RefMutGuard<Self> {
pub fn new(normalized: &mut NormalizedString) -> RefMutGuard<'_, Self> {
RefMutGuard::new(Self {
inner: RefMutContainer::new(normalized),
})
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/src/utils/pretokenization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ impl DestroyPtr for PyPreTokenizedStringRefMut {
}

impl PyPreTokenizedStringRefMut {
pub fn new(pretok: &mut tk::PreTokenizedString) -> RefMutGuard<Self> {
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 {
Expand Down

0 comments on commit cf98458

Please sign in to comment.