chore: fix nightly clippy warnings

This commit is contained in:
link2xt
2026-08-12 19:20:53 +00:00
committed by l
parent 3363f63316
commit e2b0eb1fb9
3 changed files with 11 additions and 14 deletions

View File

@@ -68,11 +68,10 @@ impl<'a> BlobObject<'a> {
// so we are doing essentially the same here.
task::block_in_place(|| {
let temp_path;
let src_in_blobdir: &Path;
let blobdir = context.get_blobdir();
if src.starts_with(blobdir) {
src_in_blobdir = src;
let src_in_blobdir = if src.starts_with(blobdir) {
src
} else {
info!(
context,
@@ -84,8 +83,8 @@ impl<'a> BlobObject<'a> {
std::fs::create_dir_all(blobdir).log_err(context).ok();
std::fs::copy(src, &temp_path).context("Copying new blobfile failed")?;
};
src_in_blobdir = &temp_path;
}
&temp_path
};
let hash = file_hash(src_in_blobdir)?.to_hex();
let hash = hash.as_str();

View File

@@ -800,13 +800,12 @@ impl Session {
context: &Context,
folder: &str,
) -> Result<()> {
let uid_validity;
// Collect pairs of UID and Message-ID.
let mut msgs = BTreeMap::new();
let folder_exists = self.select_with_uidvalidity(context, folder).await?;
let transport_id = self.transport_id();
if folder_exists {
let uid_validity = if folder_exists {
let mut list = self
.uid_fetch("1:*", RFC724MID_UID)
.await
@@ -832,11 +831,11 @@ impl Session {
msgs.len(),
);
uid_validity = get_uidvalidity(context, transport_id, folder).await?;
get_uidvalidity(context, transport_id, folder).await?
} else {
warn!(context, "resync_uids_with_server: No folder {folder}.");
uid_validity = 0;
}
0
};
// Write collected UIDs to SQLite database.
context

View File

@@ -64,13 +64,12 @@ async fn test_setup_contact_ex(case: SetupContactCase) -> (TestContext, TestCont
bob.set_config(Config::Displayname, Some("Bob Examplenet"))
.await
.unwrap();
let alice_auto_submitted_hdr: bool;
match case {
let alice_auto_submitted_hdr = match case {
SetupContactCase::AliceIsBot => {
alice.set_config_bool(Config::Bot, true).await.unwrap();
alice_auto_submitted_hdr = true;
true
}
_ => alice_auto_submitted_hdr = false,
_ => false,
};
assert_eq!(