chore: New clippy lints (#6568)

This commit is contained in:
Hocuri
2025-02-24 15:50:38 +01:00
committed by GitHub
parent fbf3ff0112
commit 7b3a1b88e6
4 changed files with 6 additions and 4 deletions

View File

@@ -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);
}

View File

@@ -1360,7 +1360,7 @@ impl Message {
/// * Lack of valid signature on 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
/// notification text can be stored in the error status.
/// notification text can be stored in the error status.
pub fn error(&self) -> Option<String> {
self.error.clone()
}

View File

@@ -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);

View File

@@ -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.
///