Skip to content

Commit

Permalink
remove mut on split_ref function
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed Jan 10, 2025
1 parent c5e7d2a commit ce4baf3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/rb/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ impl<S: Storage + ?Sized> SplitRef for LocalRb<S> {
type RefProd<'a> = Prod<&'a Self> where Self: 'a;
type RefCons<'a> = Cons<&'a Self> where Self: 'a;

fn split_ref(&mut self) -> (Self::RefProd<'_>, Self::RefCons<'_>) {
fn split_ref(&self) -> (Self::RefProd<'_>, Self::RefCons<'_>) {
(Prod::new(self), Cons::new(self))
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/rb/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ impl<S: Storage + ?Sized> SplitRef for SharedRb<S> {
type RefProd<'a> = CachingProd<&'a Self> where Self: 'a;
type RefCons<'a> = CachingCons<&'a Self> where Self: 'a;

fn split_ref(&mut self) -> (Self::RefProd<'_>, Self::RefCons<'_>) {
fn split_ref(&self) -> (Self::RefProd<'_>, Self::RefCons<'_>) {
(CachingProd::new(self), CachingCons::new(self))
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/traits/split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ pub trait SplitRef {
Self: 'a;

/// Perform splitting by reference.
fn split_ref(&mut self) -> (Self::RefProd<'_>, Self::RefCons<'_>);
fn split_ref(&self) -> (Self::RefProd<'_>, Self::RefCons<'_>);
}

0 comments on commit ce4baf3

Please sign in to comment.