mirror of
https://github.com/chatmail/core.git
synced 2026-04-24 17:06:28 +03:00
happy clippy
This commit is contained in:
@@ -1295,8 +1295,8 @@ pub async fn get_by_contact_id(context: &Context, contact_id: u32) -> Result<Cha
|
||||
Ok(chat_id)
|
||||
}
|
||||
|
||||
pub async fn prepare_msg<'a>(
|
||||
context: &'a Context,
|
||||
pub async fn prepare_msg(
|
||||
context: &Context,
|
||||
chat_id: ChatId,
|
||||
msg: &mut Message,
|
||||
) -> Result<MsgId, Error> {
|
||||
|
||||
@@ -166,6 +166,7 @@ impl Context {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
async fn exec_step(
|
||||
ctx: &Context,
|
||||
imap: &mut Imap,
|
||||
|
||||
@@ -275,6 +275,7 @@ impl Params {
|
||||
/// created without copying if the path already referes to a valid
|
||||
/// blob. If so a [BlobObject] will be returned regardless of the
|
||||
/// `create` argument.
|
||||
#[allow(clippy::needless_lifetimes)]
|
||||
pub async fn get_blob<'a>(
|
||||
&self,
|
||||
key: Param,
|
||||
|
||||
@@ -381,30 +381,26 @@ impl Scheduler {
|
||||
}
|
||||
|
||||
async fn interrupt_inbox(&self) {
|
||||
match self {
|
||||
Scheduler::Running { ref inbox, .. } => inbox.interrupt().await,
|
||||
_ => {}
|
||||
if let Scheduler::Running { ref inbox, .. } = self {
|
||||
inbox.interrupt().await;
|
||||
}
|
||||
}
|
||||
|
||||
async fn interrupt_mvbox(&self) {
|
||||
match self {
|
||||
Scheduler::Running { ref mvbox, .. } => mvbox.interrupt().await,
|
||||
_ => {}
|
||||
if let Scheduler::Running { ref mvbox, .. } = self {
|
||||
mvbox.interrupt().await;
|
||||
}
|
||||
}
|
||||
|
||||
async fn interrupt_sentbox(&self) {
|
||||
match self {
|
||||
Scheduler::Running { ref sentbox, .. } => sentbox.interrupt().await,
|
||||
_ => {}
|
||||
if let Scheduler::Running { ref sentbox, .. } = self {
|
||||
sentbox.interrupt().await;
|
||||
}
|
||||
}
|
||||
|
||||
async fn interrupt_smtp(&self) {
|
||||
match self {
|
||||
Scheduler::Running { ref smtp, .. } => smtp.interrupt().await,
|
||||
_ => {}
|
||||
if let Scheduler::Running { ref smtp, .. } = self {
|
||||
smtp.interrupt().await;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ async fn cleanup(
|
||||
/// Take a scanned QR-code and do the setup-contact/join-group handshake.
|
||||
/// See the ffi-documentation for more details.
|
||||
pub async fn dc_join_securejoin(context: &Context, qr: &str) -> ChatId {
|
||||
if let Err(_) = context.alloc_ongoing().await {
|
||||
if context.alloc_ongoing().await.is_err() {
|
||||
return cleanup(&context, ChatId::new(0), false, false).await;
|
||||
}
|
||||
|
||||
@@ -344,7 +344,7 @@ async fn send_handshake_msg(
|
||||
|
||||
chat::send_msg(context, contact_chat_id, &mut msg)
|
||||
.await
|
||||
.map_err(|err| HandshakeError::MsgSendFailed(err))?;
|
||||
.map_err(HandshakeError::MsgSendFailed)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user