From fef4e5ed238e58c925dc31d9f24a122703a75d7e Mon Sep 17 00:00:00 2001 From: Mark Date: Mon, 1 Jan 2024 15:53:00 -0800 Subject: [PATCH] Minor cleanup --- crates/content/src/handle.rs | 40 +++++------------------------------- 1 file changed, 5 insertions(+), 35 deletions(-) diff --git a/crates/content/src/handle.rs b/crates/content/src/handle.rs index e7d0951..350ad40 100644 --- a/crates/content/src/handle.rs +++ b/crates/content/src/handle.rs @@ -31,67 +31,37 @@ impl PartialEq for TextureHandle { } /// A lightweight representation of an outfit -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub struct OutfitHandle { /// TODO pub index: usize, } -impl Hash for OutfitHandle { - fn hash(&self, state: &mut H) { - self.index.hash(state) - } -} - /// A lightweight representation of a gun -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub struct GunHandle { /// TODO pub index: usize, } -impl Hash for GunHandle { - fn hash(&self, state: &mut H) { - self.index.hash(state) - } -} - /// A lightweight representation of a ship -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub struct ShipHandle { /// TODO pub index: usize, } -impl Hash for ShipHandle { - fn hash(&self, state: &mut H) { - self.index.hash(state) - } -} - /// A lightweight representation of a star system -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub struct SystemHandle { /// TODO pub index: usize, } -impl Hash for SystemHandle { - fn hash(&self, state: &mut H) { - self.index.hash(state) - } -} - /// A lightweight representation of a faction -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub struct FactionHandle { /// The index of this faction in content.factions /// TODO: pub in crate, currently for debug (same with all other handles) pub index: usize, } - -impl Hash for FactionHandle { - fn hash(&self, state: &mut H) { - self.index.hash(state) - } -}