fix clippy

This commit is contained in:
phiresky 2024-05-31 13:10:46 +02:00
parent 1c1018b191
commit 101901b8e0
2 changed files with 4 additions and 2 deletions

View file

@ -30,7 +30,7 @@ impl PartialEq for SendSuccessInfo {
/// top
impl PartialOrd for SendSuccessInfo {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
other.activity_id.partial_cmp(&self.activity_id)
Some(self.cmp(other))
}
}
impl Ord for SendSuccessInfo {

View file

@ -275,7 +275,9 @@ impl InstanceWorker {
.map(|a| a.activity_id == ActivityId(last_id.0 + 1))
.unwrap_or(false)
{
let next = successfuls.pop().unwrap();
let next = successfuls
.pop()
.context("peek above ensures pop has value")?;
last_id = next.activity_id;
self.state.last_successful_id = Some(next.activity_id);
self.state.last_successful_published_time = next.published;