ui: fix some lints
parent
a655a85b5f
commit
74be47ec5a
|
@ -699,5 +699,5 @@ pub fn send_draft(context: &mut Context, account_cursor: usize, draft: Draft) ->
|
|||
),
|
||||
));
|
||||
}
|
||||
return !failure;
|
||||
!failure
|
||||
}
|
||||
|
|
|
@ -123,9 +123,7 @@ impl ListingTrait for CompactListing {
|
|||
} else {
|
||||
Color::Default
|
||||
};
|
||||
let bg_color = if self.cursor_pos.2 == idx && self.selection[&i] {
|
||||
Color::Byte(246 | 210)
|
||||
} else if self.cursor_pos.2 == idx {
|
||||
let bg_color = if self.cursor_pos.2 == idx {
|
||||
Color::Byte(246)
|
||||
} else if self.selection[&i] {
|
||||
Color::Byte(210)
|
||||
|
|
|
@ -55,8 +55,8 @@ impl<'a> Default for UnsubscribeOption<'a> {
|
|||
impl<'a> Clone for UnsubscribeOption<'a> {
|
||||
fn clone(&self) -> Self {
|
||||
match self {
|
||||
UnsubscribeOption::Url(a) => UnsubscribeOption::Url(a.clone()),
|
||||
UnsubscribeOption::Email(a) => UnsubscribeOption::Email(a.clone()),
|
||||
UnsubscribeOption::Url(a) => UnsubscribeOption::Url(<&[u8]>::clone(a)),
|
||||
UnsubscribeOption::Email(a) => UnsubscribeOption::Email(<&[u8]>::clone(a)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -899,12 +899,10 @@ impl Component for StatusBar {
|
|||
if parse_command(&self.ex_buffer.as_str().as_bytes())
|
||||
.to_full_result()
|
||||
.is_ok()
|
||||
{
|
||||
if self.cmd_history.last().map(String::as_str)
|
||||
&& self.cmd_history.last().map(String::as_str)
|
||||
!= Some(self.ex_buffer.as_str())
|
||||
{
|
||||
self.cmd_history.push(self.ex_buffer.as_str().to_string());
|
||||
}
|
||||
{
|
||||
self.cmd_history.push(self.ex_buffer.as_str().to_string());
|
||||
}
|
||||
self.ex_buffer.clear();
|
||||
}
|
||||
|
|
|
@ -137,7 +137,7 @@ impl<'a> Iterator for MailboxIterator<'a> {
|
|||
if let Some(Err(_)) = self.folders[&fh] {
|
||||
return Some(None);
|
||||
}
|
||||
return Some(Some(self.folders[&fh].as_ref().unwrap().as_ref().unwrap()));
|
||||
Some(Some(self.folders[&fh].as_ref().unwrap().as_ref().unwrap()))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue