diff --git a/src/core.rs b/src/core.rs index 446a939..83c2b32 100644 --- a/src/core.rs +++ b/src/core.rs @@ -52,7 +52,7 @@ impl Pacdef { Some((SYNC, _)) => self.install_packages(), Some((UNMANAGED, _)) => Ok(self.show_unmanaged_packages()), Some((VERSION, _)) => Ok(self.show_version()), - Some((_, _)) => todo!(), + Some((_, _)) => panic!(), None => { unreachable!("argument parser requires some subcommand to return an `ArgMatches`") } diff --git a/src/grouping/section.rs b/src/grouping/section.rs index bccc165..b74401f 100644 --- a/src/grouping/section.rs +++ b/src/grouping/section.rs @@ -9,7 +9,7 @@ use anyhow::{ensure, Context, Result}; use super::Package; -#[derive(Debug, Eq)] +#[derive(Debug)] pub struct Section { pub name: String, pub packages: HashSet, @@ -57,6 +57,10 @@ impl PartialEq for Section { } } +impl Eq for Section { + fn assert_receiver_is_total_eq(&self) {} +} + impl PartialOrd for Section { fn partial_cmp(&self, other: &Self) -> Option { self.name.partial_cmp(&other.name) @@ -64,8 +68,8 @@ impl PartialOrd for Section { } impl Ord for Section { - fn cmp(&self, _other: &Self) -> std::cmp::Ordering { - todo!() + fn cmp(&self, other: &Self) -> std::cmp::Ordering { + self.partial_cmp(other).unwrap() } }