Skip to content

Commit

Permalink
tidy up some lifetimes
Browse files Browse the repository at this point in the history
  • Loading branch information
shortishly committed Sep 3, 2024
1 parent 89e5995 commit 49dcaec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tansu-storage/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ impl Storage {
}

#[instrument]
pub fn produce<'a>(&mut self, topition: &'a Topition, batch: Batch) -> Result<i64> {
pub fn produce(&mut self, topition: &'_ Topition, batch: Batch) -> Result<i64> {
let base_offset = if let Some(segments) = self.segments.get_mut(topition) {
segments
.last_entry()
Expand Down Expand Up @@ -318,7 +318,7 @@ impl Storage {
}

#[instrument]
pub fn last_stable_offset<'a>(&self, topition: &'a Topition) -> Result<i64> {
pub fn last_stable_offset(&self, topition: &'_ Topition) -> Result<i64> {
self.segments(topition).map(|segments| {
if segments.len() > 1 {
segments.last_key_value().map_or(0, |(_, segment)| {
Expand All @@ -333,7 +333,7 @@ impl Storage {
}

#[instrument]
pub fn high_watermark<'a>(&self, topition: &'a Topition) -> Result<i64> {
pub fn high_watermark(&self, topition: &'_ Topition) -> Result<i64> {
self.last_stable_offset(topition)
}

Expand Down

0 comments on commit 49dcaec

Please sign in to comment.