Fix unused var etc warnings

pull/144/head
Manos Pitsidianakis 2021-09-04 16:52:17 +03:00
parent 6235164df2
commit b49d965695
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
8 changed files with 11 additions and 11 deletions

View File

@ -404,9 +404,9 @@ pub trait MailBackend: ::std::fmt::Debug + Send + Sync {
fn submit( fn submit(
&self, &self,
bytes: Vec<u8>, _bytes: Vec<u8>,
mailbox_hash: Option<MailboxHash>, _mailbox_hash: Option<MailboxHash>,
flags: Option<Flag>, _flags: Option<Flag>,
) -> ResultFuture<()> { ) -> ResultFuture<()> {
Err(MeliError::new("Not supported in this backend.")) Err(MeliError::new("Not supported in this backend."))
} }

View File

@ -1173,7 +1173,7 @@ impl MaildirType {
} }
} }
Ok(children) Ok(children)
}; }
let root_path = PathBuf::from(settings.root_mailbox()).expand(); let root_path = PathBuf::from(settings.root_mailbox()).expand();
if !root_path.exists() { if !root_path.exists() {
return Err(MeliError::new(format!( return Err(MeliError::new(format!(

View File

@ -364,7 +364,7 @@ impl MailBackend for NntpType {
&self, &self,
bytes: Vec<u8>, bytes: Vec<u8>,
mailbox_hash: Option<MailboxHash>, mailbox_hash: Option<MailboxHash>,
flags: Option<Flag>, _flags: Option<Flag>,
) -> ResultFuture<()> { ) -> ResultFuture<()> {
let connection = self.connection.clone(); let connection = self.connection.clone();
Ok(Box::pin(async move { Ok(Box::pin(async move {

View File

@ -74,8 +74,8 @@ impl AccountSettings {
} }
} }
#[serde(default)]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(default)]
pub struct MailboxConf { pub struct MailboxConf {
#[serde(alias = "rename")] #[serde(alias = "rename")]
pub alias: Option<String>, pub alias: Option<String>,

View File

@ -158,7 +158,7 @@ impl<'a> Iterator for LineBreakCandidateIter<'a> {
} }
$last_break = $pos; $last_break = $pos;
}; };
}; }
// After end of text, there are no breaks. // After end of text, there are no breaks.
if self.pos > self.text.len() { if self.pos > self.text.len() {
return None; return None;

View File

@ -907,7 +907,7 @@ impl MailView {
} }
} }
} }
}; }
rec(body, context, coordinates, &mut ret, active_jobs); rec(body, context, coordinates, &mut ret, active_jobs);
ret ret
} }

View File

@ -130,8 +130,8 @@ pub struct MailUIConf {
pub pgp: PGPSettingsOverride, pub pgp: PGPSettingsOverride,
} }
#[serde(default)]
#[derive(Debug, Default, Clone, Serialize, Deserialize)] #[derive(Debug, Default, Clone, Serialize, Deserialize)]
#[serde(default)]
pub struct FileMailboxConf { pub struct FileMailboxConf {
#[serde(flatten)] #[serde(flatten)]
pub conf_override: MailUIConf, pub conf_override: MailUIConf,

View File

@ -2264,7 +2264,7 @@ fn build_mailboxes_order(
} }
} }
node node
}; }
tree.push(rec(*h, &mailbox_entries, 0)); tree.push(rec(*h, &mailbox_entries, 0));
} }
@ -2356,7 +2356,7 @@ fn build_mailboxes_order(
iter.peek() != None, iter.peek() != None,
); );
} }
}; }
rec(node, &mailbox_entries, 0, 0, false); rec(node, &mailbox_entries, 0, 0, false);
} }