From 5d410f88f3258e9c61287d199279e6e53613af7d Mon Sep 17 00:00:00 2001 From: jake Date: Fri, 10 Dec 2021 13:20:20 -0700 Subject: [PATCH] PartialEq LocalClientId u8 --- src/ship/location.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ship/location.rs b/src/ship/location.rs index a0c05f5..a40f858 100644 --- a/src/ship/location.rs +++ b/src/ship/location.rs @@ -109,6 +109,12 @@ impl LocalClientId { } } +impl PartialEq for LocalClientId { + fn eq(&self, other: &u8) -> bool { + self.0 == *other as usize + } +} + #[derive(Debug, Copy, Clone, PartialEq)] pub struct AreaClient { pub client: ClientId,