Skip to content

Commit

Permalink
Clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mdecimus committed Feb 13, 2024
1 parent 44db67c commit 8471706
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion crates/jmap/src/blob/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ use utils::BlobHash;
use crate::{auth::AccessToken, JMAP};

impl JMAP {
#[allow(clippy::blocks_in_if_conditions)]
#[allow(clippy::blocks_in_conditions)]
pub async fn blob_download(
&self,
blob_id: &BlobId,
Expand Down
2 changes: 1 addition & 1 deletion crates/jmap/src/blob/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ impl JMAP {
})
}

#[allow(clippy::blocks_in_if_conditions)]
#[allow(clippy::blocks_in_conditions)]
pub async fn put_blob(
&self,
account_id: u32,
Expand Down
2 changes: 1 addition & 1 deletion crates/jmap/src/email/ingest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub struct IngestEmail<'x> {
const MAX_RETRIES: u32 = 10;

impl JMAP {
#[allow(clippy::blocks_in_if_conditions)]
#[allow(clippy::blocks_in_conditions)]
pub async fn email_ingest(
&self,
mut params: IngestEmail<'_>,
Expand Down
4 changes: 2 additions & 2 deletions crates/jmap/src/mailbox/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pub static SCHEMA: &[IndexProperty] = &[
];

impl JMAP {
#[allow(clippy::blocks_in_if_conditions)]
#[allow(clippy::blocks_in_conditions)]
pub async fn mailbox_set(
&self,
mut request: SetRequest<SetArguments>,
Expand Down Expand Up @@ -523,7 +523,7 @@ impl JMAP {
}
}

#[allow(clippy::blocks_in_if_conditions)]
#[allow(clippy::blocks_in_conditions)]
async fn mailbox_set_item(
&self,
changes_: Object<SetValue>,
Expand Down
1 change: 1 addition & 0 deletions crates/jmap/src/sieve/get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ impl JMAP {
}
}

#[allow(clippy::blocks_in_conditions)]
async fn sieve_script_compile(
&self,
account_id: u32,
Expand Down
2 changes: 1 addition & 1 deletion crates/jmap/src/sieve/ingest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ struct SieveMessage<'x> {
}

impl JMAP {
#[allow(clippy::blocks_in_if_conditions)]
#[allow(clippy::blocks_in_conditions)]
pub async fn sieve_script_ingest(
&self,
raw_message: &[u8],
Expand Down
2 changes: 1 addition & 1 deletion crates/jmap/src/sieve/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ impl JMAP {
Ok(true)
}

#[allow(clippy::blocks_in_if_conditions)]
#[allow(clippy::blocks_in_conditions)]
async fn sieve_set_item(
&self,
changes_: Object<SetValue>,
Expand Down
2 changes: 1 addition & 1 deletion crates/smtp/src/reporting/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ impl SMTP {
use rand::Rng;
use std::time::Duration;

let delivery_time = Duration::from_secs(rand::thread_rng().gen_range(0..10800));
let delivery_time = rand::thread_rng().gen_range(0u64..10800u64);
for domain in &mut message.domains {
domain.retry.due += delivery_time;
domain.expires += delivery_time;
Expand Down
2 changes: 1 addition & 1 deletion crates/utils/src/listener/listen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl Server {
instance = instance.id,
protocol = ?instance.protocol,
"Listener shutting down.");
manager.shutdown();
manager.shutdown().await;
break;
}
};
Expand Down

0 comments on commit 8471706

Please sign in to comment.