RFC9698 - JMAPACCESS Extension for IMAP

This commit is contained in:
mdecimus
2025-05-16 16:44:37 +02:00
parent 10bb4e5661
commit cee4149ef4
15 changed files with 18 additions and 24 deletions

View File

@@ -193,7 +193,7 @@ impl AzureStore {
fn build_key(&self, key: &[u8]) -> String {
if let Some(prefix) = &self.prefix {
let mut writer =
Base32Writer::with_raw_capacity(prefix.len() + ((key.len() + 3) / 4 * 5));
Base32Writer::with_raw_capacity(prefix.len() + (key.len().div_ceil(4) * 5));
writer.push_string(prefix);
writer.write_all(key).unwrap();
writer.finalize()

View File

@@ -174,8 +174,7 @@ impl MysqlStore {
result.push_counter_id(
trx.exec_first::<i64, _, _>(&s, ()).await?.ok_or_else(|| {
mysql_async::Error::Io(mysql_async::IoError::Io(
std::io::Error::new(
std::io::ErrorKind::Other,
std::io::Error::other(
"LAST_INSERT_ID() did not return a value",
),
))

View File

@@ -179,7 +179,7 @@ impl S3Store {
fn build_key(&self, key: &[u8]) -> String {
if let Some(prefix) = &self.prefix {
let mut writer =
Base32Writer::with_raw_capacity(prefix.len() + ((key.len() + 3) / 4 * 5));
Base32Writer::with_raw_capacity(prefix.len() + (key.len().div_ceil(4) * 5));
writer.push_string(prefix);
writer.write_all(key).unwrap();
writer.finalize()