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 {
|
struct Item {
|
||||||
name: String,
|
name: String,
|
||||||
color: Color,
|
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 {
|
impl From<&str> for Item {
|
||||||
fn from(s: &str) -> Self {
|
fn from(s: &str) -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
|
@ -166,10 +172,10 @@ impl Sandbox for App {
|
||||||
|
|
||||||
items.sort_by(|a, b| match self.order {
|
items.sort_by(|a, b| match self.order {
|
||||||
Order::Ascending => {
|
Order::Ascending => {
|
||||||
(&a.name).to_lowercase().cmp(&(&b.name).to_lowercase())
|
a.name.to_lowercase().cmp(&b.name.to_lowercase())
|
||||||
}
|
}
|
||||||
Order::Descending => {
|
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