fix use std::mem related lint
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
48d9677959
commit
0923b6f428
3 changed files with 7 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
use std::{mem, sync::Arc};
|
||||
use std::{mem::size_of, sync::Arc};
|
||||
|
||||
use ruma::{EventId, RoomId, UserId};
|
||||
|
||||
|
@ -44,7 +44,7 @@ impl Data for KeyValueDatabase {
|
|||
.iter_from(¤t, true)
|
||||
.take_while(move |(k, _)| k.starts_with(&prefix))
|
||||
.map(move |(tofrom, _data)| {
|
||||
let from = utils::u64_from_bytes(&tofrom[(mem::size_of::<u64>())..])
|
||||
let from = utils::u64_from_bytes(&tofrom[(size_of::<u64>())..])
|
||||
.map_err(|_| Error::bad_database("Invalid count in tofrom_relation."))?;
|
||||
|
||||
let mut pduid = shortroomid.to_be_bytes().to_vec();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue