Skip to content

Commit 7b3a1b8

Browse files
authored
chore: New clippy lints (#6568)
1 parent fbf3ff0 commit 7b3a1b8

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

src/blob/blob_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ async fn test_create_long_names() {
100100
let t = TestContext::new().await;
101101
let s = format!("file.{}", "a".repeat(100));
102102
let blob = BlobObject::create_and_deduplicate_from_bytes(&t, b"data", &s).unwrap();
103-
let blobname = blob.as_name().split('/').last().unwrap();
103+
let blobname = blob.as_name().split('/').next_back().unwrap();
104104
assert!(blobname.len() < 70);
105105
}
106106

src/message.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,7 @@ impl Message {
13601360
/// * Lack of valid signature on an e2ee message, usually for received messages.
13611361
/// * Failure to decrypt an e2ee message, usually for received messages.
13621362
/// * When a message could not be delivered to one or more recipients the non-delivery
1363-
/// notification text can be stored in the error status.
1363+
/// notification text can be stored in the error status.
13641364
pub fn error(&self) -> Option<String> {
13651365
self.error.clone()
13661366
}

src/net/http.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ async fn fetch_url(context: &Context, original_url: &str) -> Result<Response> {
253253
.headers()
254254
.get_all("location")
255255
.iter()
256-
.last()
256+
.next_back()
257257
.ok_or_else(|| anyhow!("Redirection doesn't have a target location"))?
258258
.to_str()?;
259259
info!(context, "Following redirect to {}", header);

src/sql.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,9 @@ impl Sql {
458458
/// in parallel with other transactions. NB: Creating and modifying temporary tables are also
459459
/// allowed with `query_only`, temporary tables aren't visible in other connections, but you
460460
/// need to pass `PRAGMA query_only=0;` to SQLite before that:
461-
/// `pragma_update(None, "query_only", "0")`.
461+
/// ```text
462+
/// pragma_update(None, "query_only", "0")
463+
/// ```
462464
/// Also temporary tables need to be dropped because the connection is returned to the pool
463465
/// then.
464466
///

0 commit comments

Comments
 (0)