Skip to content

Commit

Permalink
Implement DerefMut for Log<T> (#786)
Browse files Browse the repository at this point in the history
Implement DerefMut for Log<T>
  • Loading branch information
wtdcode authored Oct 25, 2024
1 parent 2c4d3fe commit e715933
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/primitives/src/log/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ impl<T> core::ops::Deref for Log<T> {
}
}

impl<T> core::ops::DerefMut for Log<T> {
#[inline]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.data
}
}

impl Log {
/// Creates a new log.
#[inline]
Expand Down

0 comments on commit e715933

Please sign in to comment.