Fix new 1.77 clippy lints

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
pull/372/head
Manos Pitsidianakis 2 months ago
parent 6a66afe93e
commit a69c674c07
No known key found for this signature in database
GPG Key ID: 7729C7707F7E09D0

@ -90,7 +90,6 @@ pub use melib::uuid;
pub extern crate bitflags; pub extern crate bitflags;
pub extern crate serde_json; pub extern crate serde_json;
#[macro_use]
pub extern crate smallvec; pub extern crate smallvec;
pub extern crate termion; pub extern crate termion;

@ -56,6 +56,7 @@ impl File {
.read(true) .read(true)
.write(true) .write(true)
.create(true) .create(true)
.truncate(false)
.open(&self.path) .open(&self.path)
.chain_err_summary(|| format!("Could not create/open path {}", self.path.display())) .chain_err_summary(|| format!("Could not create/open path {}", self.path.display()))
} }

@ -411,7 +411,7 @@ impl MailBackend for ImapType {
let inbox = timeout(uid_store.timeout, uid_store.mailboxes.lock()) let inbox = timeout(uid_store.timeout, uid_store.mailboxes.lock())
.await? .await?
.get(&mailbox_hash) .get(&mailbox_hash)
.map(std::clone::Clone::clone) .cloned()
.unwrap(); .unwrap();
let mut conn = timeout(uid_store.timeout, main_conn.lock()).await?; let mut conn = timeout(uid_store.timeout, main_conn.lock()).await?;
watch::examine_updates(inbox, &mut conn, &uid_store).await?; watch::examine_updates(inbox, &mut conn, &uid_store).await?;

@ -69,7 +69,7 @@ pub async fn idle(kit: ImapWatchKit) -> Result<()> {
.await .await
.values() .values()
.find(|f| f.parent.is_none() && (f.special_usage() == SpecialUsageMailbox::Inbox)) .find(|f| f.parent.is_none() && (f.special_usage() == SpecialUsageMailbox::Inbox))
.map(std::clone::Clone::clone) .cloned()
{ {
Some(mailbox) => mailbox, Some(mailbox) => mailbox,
None => { None => {

@ -258,7 +258,7 @@ impl MailBackend for NntpType {
.lock() .lock()
.await .await
.get(&mailbox_hash) .get(&mailbox_hash)
.map(std::clone::Clone::clone) .cloned()
.ok_or_else(|| { .ok_or_else(|| {
Error::new(format!( Error::new(format!(
"Mailbox with hash {} not found in NNTP connection, this could possibly \ "Mailbox with hash {} not found in NNTP connection, this could possibly \

Loading…
Cancel
Save