use fast binary_search for some const slices

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-12-15 01:41:50 -05:00
parent 52693db477
commit 6c96acc482
No known key found for this signature in database
6 changed files with 41 additions and 39 deletions

View file

@ -1262,7 +1262,7 @@ impl Service {
#[implement(Service)]
#[tracing::instrument(skip_all, level = "debug")]
async fn check_pdu_for_admin_room(&self, pdu: &PduEvent, sender: &UserId) -> Result<()> {
match pdu.event_type() {
match &pdu.kind {
| TimelineEventType::RoomEncryption => {
return Err!(Request(Forbidden(error!("Encryption not supported in admins room."))));
},