mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 15:26:30 +03:00
chore: New clippy lints (#6568)
This commit is contained in:
@@ -100,7 +100,7 @@ async fn test_create_long_names() {
|
|||||||
let t = TestContext::new().await;
|
let t = TestContext::new().await;
|
||||||
let s = format!("file.{}", "a".repeat(100));
|
let s = format!("file.{}", "a".repeat(100));
|
||||||
let blob = BlobObject::create_and_deduplicate_from_bytes(&t, b"data", &s).unwrap();
|
let blob = BlobObject::create_and_deduplicate_from_bytes(&t, b"data", &s).unwrap();
|
||||||
let blobname = blob.as_name().split('/').last().unwrap();
|
let blobname = blob.as_name().split('/').next_back().unwrap();
|
||||||
assert!(blobname.len() < 70);
|
assert!(blobname.len() < 70);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1360,7 +1360,7 @@ impl Message {
|
|||||||
/// * Lack of valid signature on an e2ee message, usually for received messages.
|
/// * Lack of valid signature on an e2ee message, usually for received messages.
|
||||||
/// * Failure to decrypt an e2ee message, usually for received messages.
|
/// * Failure to decrypt an e2ee message, usually for received messages.
|
||||||
/// * When a message could not be delivered to one or more recipients the non-delivery
|
/// * When a message could not be delivered to one or more recipients the non-delivery
|
||||||
/// notification text can be stored in the error status.
|
/// notification text can be stored in the error status.
|
||||||
pub fn error(&self) -> Option<String> {
|
pub fn error(&self) -> Option<String> {
|
||||||
self.error.clone()
|
self.error.clone()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ async fn fetch_url(context: &Context, original_url: &str) -> Result<Response> {
|
|||||||
.headers()
|
.headers()
|
||||||
.get_all("location")
|
.get_all("location")
|
||||||
.iter()
|
.iter()
|
||||||
.last()
|
.next_back()
|
||||||
.ok_or_else(|| anyhow!("Redirection doesn't have a target location"))?
|
.ok_or_else(|| anyhow!("Redirection doesn't have a target location"))?
|
||||||
.to_str()?;
|
.to_str()?;
|
||||||
info!(context, "Following redirect to {}", header);
|
info!(context, "Following redirect to {}", header);
|
||||||
|
|||||||
@@ -458,7 +458,9 @@ impl Sql {
|
|||||||
/// in parallel with other transactions. NB: Creating and modifying temporary tables are also
|
/// in parallel with other transactions. NB: Creating and modifying temporary tables are also
|
||||||
/// allowed with `query_only`, temporary tables aren't visible in other connections, but you
|
/// allowed with `query_only`, temporary tables aren't visible in other connections, but you
|
||||||
/// need to pass `PRAGMA query_only=0;` to SQLite before that:
|
/// need to pass `PRAGMA query_only=0;` to SQLite before that:
|
||||||
/// `pragma_update(None, "query_only", "0")`.
|
/// ```text
|
||||||
|
/// pragma_update(None, "query_only", "0")
|
||||||
|
/// ```
|
||||||
/// Also temporary tables need to be dropped because the connection is returned to the pool
|
/// Also temporary tables need to be dropped because the connection is returned to the pool
|
||||||
/// then.
|
/// then.
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user