Skip to content

Conversation

@guidiaz
Copy link
Contributor

@guidiaz guidiaz commented Sep 10, 2025

No description provided.

@guidiaz guidiaz requested a review from aesedepece September 10, 2025 18:12
let reverse = msg.reverse.unwrap_or_default();
let mut since_epoch: i64 = msg.since.unwrap_or_default();
if since_epoch < 0 {
since_epoch = i64::from(self.current_epoch.unwrap()).saturating_add(since_epoch);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
since_epoch = i64::from(self.current_epoch.unwrap()).saturating_add(since_epoch);
if let Some(current) = self.current_epoch {
since_epoch = i64::from(current).saturating_add(since_epoch);
}

Comment on lines +1550 to +1556
.filter_map(|tuple| {
if tuple.0 >= since_epoch {
Some(*tuple)
} else {
None
}
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may use filter instead of map_filter

Suggested change
.filter_map(|tuple| {
if tuple.0 >= since_epoch {
Some(*tuple)
} else {
None
}
})
.filter(|(epoch, _)| *epoch >= since_epoch)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing to filter makes later collect to fail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants