Update MSRV to 1.81.0

Plus a "__CARGO_FIX_YOLO=1 cargo clippy --fix"
This commit is contained in:
Lambda 2024-09-05 18:35:24 +00:00 committed by Charles Hall
parent 74589043f7
commit 3a55684623
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
14 changed files with 38 additions and 52 deletions

View file

@ -1,5 +1,3 @@
use std::mem;
use ruma::{
api::client::threads::get_threads::v1::IncludeThreads, OwnedUserId, RoomId,
UserId,
@ -36,14 +34,13 @@ impl service::rooms::threads::Data for KeyValueDatabase {
.iter_from(&current, true)
.take_while(move |(k, _)| k.starts_with(&prefix))
.map(move |(pduid, _users)| {
let count = utils::u64_from_bytes(
&pduid[(mem::size_of::<u64>())..],
)
.map_err(|_| {
Error::bad_database(
"Invalid pduid in threadid_userids.",
)
})?;
let count =
utils::u64_from_bytes(&pduid[(size_of::<u64>())..])
.map_err(|_| {
Error::bad_database(
"Invalid pduid in threadid_userids.",
)
})?;
let pduid = PduId::new(pduid);