mirror of
https://github.com/chatmail/core.git
synced 2026-08-14 21:03:29 +03:00
chore: fix nightly clippy warnings
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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!(
|
||||
|
||||
Reference in New Issue
Block a user