fix edition 2024 lints
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
cbf207bd1f
commit
a67ab75417
36 changed files with 60 additions and 72 deletions
|
@ -170,7 +170,7 @@ pub async fn handle_incoming_pdu<'a>(
|
|||
| Entry::Occupied(mut e) => {
|
||||
*e.get_mut() = (now, e.get().1.saturating_add(1));
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ pub async fn get_summary_and_children_local(
|
|||
SummaryAccessibility::Inaccessible
|
||||
},
|
||||
)),
|
||||
};
|
||||
}
|
||||
|
||||
let children_pdus: Vec<_> = self
|
||||
.get_stripped_space_child_events(current_room)
|
||||
|
|
|
@ -218,7 +218,7 @@ impl Service {
|
|||
)
|
||||
.await
|
||||
.ok();
|
||||
};
|
||||
}
|
||||
|
||||
// Copy direct chat flag
|
||||
if let Ok(mut direct_event) = self
|
||||
|
@ -250,7 +250,7 @@ impl Service {
|
|||
)
|
||||
.await?;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -303,7 +303,7 @@ impl Service {
|
|||
});
|
||||
|
||||
return Ok(());
|
||||
};
|
||||
}
|
||||
|
||||
// Else we have two options.
|
||||
// 1. We add the current diff on top of the parent layer.
|
||||
|
@ -419,7 +419,7 @@ impl Service {
|
|||
2, // every state change is 2 event changes on average
|
||||
states_parents,
|
||||
)?;
|
||||
};
|
||||
}
|
||||
|
||||
Ok(HashSetCompressStateEvent {
|
||||
shortstatehash: new_shortstatehash,
|
||||
|
|
|
@ -422,7 +422,7 @@ impl Service {
|
|||
highlight = true;
|
||||
},
|
||||
| _ => {},
|
||||
};
|
||||
}
|
||||
|
||||
// Break early if both conditions are true
|
||||
if notify && highlight {
|
||||
|
@ -484,7 +484,7 @@ impl Service {
|
|||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
| TimelineEventType::SpaceChild =>
|
||||
if let Some(_state_key) = &pdu.state_key {
|
||||
|
@ -776,7 +776,7 @@ impl Service {
|
|||
| _ => {
|
||||
pdu_json.remove("event_id");
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
// Add origin because synapse likes that (and it's required in the spec)
|
||||
pdu_json.insert(
|
||||
|
@ -847,7 +847,7 @@ impl Service {
|
|||
{
|
||||
return Err!(Request(Forbidden("User cannot redact this event.")));
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
| _ => {
|
||||
let content: RoomRedactionEventContent = pdu.get_content()?;
|
||||
|
@ -863,7 +863,7 @@ impl Service {
|
|||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if pdu.kind == TimelineEventType::RoomMember {
|
||||
let content: RoomMemberEventContent = pdu.get_content()?;
|
||||
|
@ -1293,10 +1293,10 @@ async fn check_pdu_for_admin_room(&self, pdu: &PduEvent, sender: &UserId) -> Res
|
|||
}
|
||||
},
|
||||
| _ => {},
|
||||
};
|
||||
}
|
||||
},
|
||||
| _ => {},
|
||||
};
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue