Browse Source

Fix unused var etc warnings

master
Manos Pitsidianakis 3 months ago
parent
commit
b49d965695
Signed by: epilys GPG Key ID: 73627C2F690DF710
  1. 6
      melib/src/backends.rs
  2. 2
      melib/src/backends/maildir/backend.rs
  3. 2
      melib/src/backends/nntp.rs
  4. 2
      melib/src/conf.rs
  5. 2
      melib/src/text_processing/line_break.rs
  6. 2
      src/components/mail/view.rs
  7. 2
      src/conf.rs
  8. 4
      src/conf/accounts.rs

6
melib/src/backends.rs

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

2
melib/src/backends/maildir/backend.rs

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

2
melib/src/backends/nntp.rs

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

2
melib/src/conf.rs

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

2
melib/src/text_processing/line_break.rs

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

2
src/components/mail/view.rs

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

2
src/conf.rs

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

4
src/conf/accounts.rs

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

Loading…
Cancel
Save