mirror of
https://github.com/chatmail/core.git
synced 2026-05-22 16:26:31 +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 s = format!("file.{}", "a".repeat(100));
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@ async fn fetch_url(context: &Context, original_url: &str) -> Result<Response> {
|
||||
.headers()
|
||||
.get_all("location")
|
||||
.iter()
|
||||
.last()
|
||||
.next_back()
|
||||
.ok_or_else(|| anyhow!("Redirection doesn't have a target location"))?
|
||||
.to_str()?;
|
||||
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
|
||||
/// 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:
|
||||
/// `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
|
||||
/// then.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user