mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 08:11:24 +01:00
stop putting comments in the middle of call chains
`rustfmt` doesn't handle this very well.
This commit is contained in:
parent
1911ad34d9
commit
05be778fbb
10 changed files with 35 additions and 38 deletions
|
|
@ -117,13 +117,13 @@ impl service::rooms::user::Data for KeyValueDatabase {
|
|||
self.userroomid_joined
|
||||
.scan_prefix(prefix)
|
||||
.map(|(key, _)| {
|
||||
// Plus one because the room id starts AFTER the separator
|
||||
let roomid_index = key
|
||||
.iter()
|
||||
.enumerate()
|
||||
.find(|(_, &b)| b == 0xff)
|
||||
.ok_or_else(|| Error::bad_database("Invalid userroomid_joined in db."))?
|
||||
.0
|
||||
// +1 because the room id starts AFTER the separator
|
||||
+ 1;
|
||||
|
||||
let room_id = key[roomid_index..].to_vec();
|
||||
|
|
|
|||
|
|
@ -828,9 +828,9 @@ impl service::users::Data for KeyValueDatabase {
|
|||
let mut last = prefix.clone();
|
||||
last.extend_from_slice(&until.to_be_bytes());
|
||||
|
||||
// Include last
|
||||
for (key, _) in self
|
||||
.todeviceid_events
|
||||
// this includes last
|
||||
.iter_from(&last, true)
|
||||
.take_while(move |(k, _)| k.starts_with(&prefix))
|
||||
.map(|(key, _)| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue