Compare commits

...

2 Commits

Author SHA1 Message Date
Ginger 458811f241 fix: Fix nexy's very accurate and not-at-all busted fix to my fix 2025-09-17 20:04:50 -04:00
nexy7574 0672ce5b88 style: Fix clippy lint errors 2025-09-17 23:54:09 +01:00
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -573,7 +573,7 @@ async fn fix_readreceiptid_readreceipt_duplicates(services: &Services) -> Result
db.db.sort() db.db.sort()
} }
const FIXED_CORRUPT_MSC4133_FIELDS_MARKER: &'static [u8] = b"fix_corrupt_msc4133_fields"; const FIXED_CORRUPT_MSC4133_FIELDS_MARKER: &[u8] = b"fix_corrupt_msc4133_fields";
async fn fix_corrupt_msc4133_fields(services: &Services) -> Result { async fn fix_corrupt_msc4133_fields(services: &Services) -> Result {
use serde_json::{Value, from_slice}; use serde_json::{Value, from_slice};
type KeyVal<'a> = ((OwnedUserId, String), &'a [u8]); type KeyVal<'a> = ((OwnedUserId, String), &'a [u8]);
@@ -607,9 +607,9 @@ async fn fix_corrupt_msc4133_fields(services: &Services) -> Result {
}; };
useridprofilekey_value.put((user, key), new_value); useridprofilekey_value.put((user, key), new_value);
fixed += 1; fixed = fixed.saturating_add(1);
} }
total += 1; total = total.saturating_add(1);
Ok((total, fixed)) Ok((total, fixed))
}, },
+1 -1
View File
@@ -1113,7 +1113,7 @@ impl Service {
.useridprofilekey_value .useridprofilekey_value
.qry(&key) .qry(&key)
.await .await
.and_then(|handle| serde_json::from_slice(&handle).map_err(|err| err.into())) .and_then(|handle| serde_json::from_slice(&handle).map_err(Into::into))
} }
/// Gets all the user's profile keys and values in an iterator /// Gets all the user's profile keys and values in an iterator