fixup! add support for the imap quota extension (RFC 2087)
This commit is contained in:
parent
0a9297f0fc
commit
e082d2f4f4
2 changed files with 8 additions and 9 deletions
|
|
@ -2556,8 +2556,9 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn get_quota_with_limits() {
|
||||
let response = b"* QUOTA my_root (STORAGE 10 500)\r\n\
|
||||
a1 OK completed\r\n"
|
||||
let response = b"* QUOTA my_root (STORAGE 10 500)\r
|
||||
a1 OK completed\r
|
||||
"
|
||||
.to_vec();
|
||||
let mock_stream = MockStream::new(response);
|
||||
let mut session = mock_session!(mock_stream);
|
||||
|
|
|
|||
|
|
@ -49,12 +49,10 @@ pub enum QuotaResourceName<'a> {
|
|||
|
||||
impl<'a> From<&'a str> for QuotaResourceName<'a> {
|
||||
fn from(input: &'a str) -> Self {
|
||||
if input == "STORAGE" {
|
||||
QuotaResourceName::Storage
|
||||
} else if input == "MESSAGE" {
|
||||
QuotaResourceName::Message
|
||||
} else {
|
||||
QuotaResourceName::Atom(Cow::from(input))
|
||||
match input {
|
||||
"STORAGE" => QuotaResourceName::Storage,
|
||||
"MESSAGE" => QuotaResourceName::Message,
|
||||
_ => QuotaResourceName::Atom(Cow::from(input)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue