From bd111b6d532afeb1ea175ac0f1b46fc020cca10a Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 8 Mar 2025 08:57:41 -0500 Subject: [PATCH] Remove manual Eq implementation for Repository --- src/common.rs | 2 +- src/repository.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/common.rs b/src/common.rs index 66d2d51..7b99fd0 100755 --- a/src/common.rs +++ b/src/common.rs @@ -62,7 +62,7 @@ pub fn read_version(p: &Path) -> Option { #[binrw] #[brw(repr = u8)] -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub enum Platform { /// Windows and macOS Win32 = 0x0, diff --git a/src/repository.rs b/src/repository.rs index a54ce6e..a5f1c13 100755 --- a/src/repository.rs +++ b/src/repository.rs @@ -23,7 +23,7 @@ pub enum RepositoryType { /// Encapsulates a directory of game data, such as "ex1". This data is also versioned. /// This handles calculating the correct dat and index filenames, mainly for `GameData`. -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Eq)] pub struct Repository { /// The folder name, such as "ex1". pub name: String, @@ -35,8 +35,6 @@ pub struct Repository { pub version: Option, } -impl Eq for Repository {} - impl PartialEq for Repository { fn eq(&self, other: &Self) -> bool { self.name == other.name