RFC9698 - JMAPACCESS Extension for IMAP
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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",
|
||||
),
|
||||
))
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user