This commit is contained in:
Mateusz Gruszczyński committed 2026-10-31 14:36:07 +01:00
1 parent fc81ecafd6
commit dc57aa7089
89 files changed
+5290 -1551

No files matched your search

+2 -3
View File
@@ -122,7 +122,7 @@ impl ManageSieveClient {
let plain = format!("\0{}\0{}", creds.username, creds.password);
let encoded = base64::engine::general_purpose::STANDARD.encode(plain.as_bytes());
let command = format!("AUTHENTICATE \"PLAIN\" \"{}\"\r\n", encoded);
let command = format!("AUTHENTICATE \"PLAIN\" \"{encoded}\"\r\n");
write_all_timeout(&mut stream, command.as_bytes(), creds.timeout).await?;
let auth = read_response(&mut stream, creds.timeout).await?;
if auth.status == ResponseStatus::No || auth.status == ResponseStatus::Bye {
@@ -421,8 +421,7 @@ async fn read_wire_line<S: AsyncRead + Unpin>(stream: &mut S) -> Result<WireLine
if size > MAX_LITERAL_BYTES {
return Err(SieveError::Protocol(format!(
"server literal exceeds {} bytes",
MAX_LITERAL_BYTES
"server literal exceeds {MAX_LITERAL_BYTES} bytes"
)));
}
let mut literal = vec![0u8; size];
+1 -1
View File
@@ -29,7 +29,7 @@ impl fmt::Display for SieveError {
write!(f, "ManageSieve server rejected the command: {msg}")
}
Self::Timeout => write!(f, "ManageSieve operation timed out"),
Self::ScriptTooLarge => write!(f, "Sieve script exceeds the RustBox 0.1.2 size limit"),
Self::ScriptTooLarge => write!(f, "Sieve script exceeds the RustBox 0.2.0 size limit"),
}
}
}