Fix clippy warnings

config-extension
trivernis 2 years ago
parent a44b235f83
commit 0cad5f7d02
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -90,18 +90,18 @@ pub struct Partition {
#[derive(Clone, Debug, Deserialize, RustyValue)] #[derive(Clone, Debug, Deserialize, RustyValue)]
pub enum FileSystem { pub enum FileSystem {
VFAT, VFat,
BFS, Bfs,
CramFS, CramFS,
Ext2, Ext2,
Ext3, Ext3,
Ext4, Ext4,
FAT, Fat,
MSDOS, Msdos,
XFS, Xfs,
BTRFS, Btrfs,
Minix, Minix,
F2FS, F2fs,
} }
#[derive(Clone, Debug, Deserialize, RustyValue)] #[derive(Clone, Debug, Deserialize, RustyValue)]
@ -131,7 +131,7 @@ pub enum DesktopConfig {
I3Gaps, I3Gaps,
HerbstluftWM, HerbstluftWM,
AwesomeWM, AwesomeWM,
BSPWM, Bspwm,
} }
pub type ExtraPackages = Vec<String>; pub type ExtraPackages = Vec<String>;

@ -68,5 +68,5 @@ fn config_is_falsy(config: &embed_nu::Value) -> bool {
} else if let Ok(b) = config.as_bool() { } else if let Ok(b) = config.as_bool() {
return !b; return !b;
} }
return false; false
} }

@ -37,16 +37,12 @@ impl Task {
pub fn compare(&self, other: &Self) -> Ordering { pub fn compare(&self, other: &Self) -> Ordering {
if self.is_base() && other.is_custom() { if self.is_base() && other.is_custom() {
Ordering::Less Ordering::Less
} else if self.is_custom() && other.is_base() { } else if self.is_custom() && other.is_base() || self.order() > other.order() {
Ordering::Greater Ordering::Greater
} else if self.order() < other.order() {
Ordering::Less
} else { } else {
if self.order() > other.order() { Ordering::Equal
Ordering::Greater
} else if self.order() < other.order() {
Ordering::Less
} else {
Ordering::Equal
}
} }
} }
} }

Loading…
Cancel
Save