mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 458811f241 | |||
| 0672ce5b88 |
@@ -573,7 +573,7 @@ async fn fix_readreceiptid_readreceipt_duplicates(services: &Services) -> Result
|
||||
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 {
|
||||
use serde_json::{Value, from_slice};
|
||||
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);
|
||||
fixed += 1;
|
||||
fixed = fixed.saturating_add(1);
|
||||
}
|
||||
total += 1;
|
||||
total = total.saturating_add(1);
|
||||
|
||||
Ok((total, fixed))
|
||||
},
|
||||
|
||||
@@ -1113,7 +1113,7 @@ impl Service {
|
||||
.useridprofilekey_value
|
||||
.qry(&key)
|
||||
.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
|
||||
|
||||
Reference in New Issue
Block a user