clippy
This commit is contained in:
parent
45dda41c4c
commit
c7c5611087
1 changed files with 9 additions and 3 deletions
|
|
@ -86,7 +86,7 @@ impl From<Color> for iced::Color {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
#[derive(Clone, Debug, Eq)]
|
||||
struct Item {
|
||||
name: String,
|
||||
color: Color,
|
||||
|
|
@ -98,6 +98,12 @@ impl Hash for Item {
|
|||
}
|
||||
}
|
||||
|
||||
impl PartialEq for Item {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
self.name.eq(&other.name)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<&str> for Item {
|
||||
fn from(s: &str) -> Self {
|
||||
Self {
|
||||
|
|
@ -166,10 +172,10 @@ impl Sandbox for App {
|
|||
|
||||
items.sort_by(|a, b| match self.order {
|
||||
Order::Ascending => {
|
||||
(&a.name).to_lowercase().cmp(&(&b.name).to_lowercase())
|
||||
a.name.to_lowercase().cmp(&b.name.to_lowercase())
|
||||
}
|
||||
Order::Descending => {
|
||||
(&b.name).to_lowercase().cmp(&(&a.name).to_lowercase())
|
||||
b.name.to_lowercase().cmp(&a.name.to_lowercase())
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue