From 2b3a375c4f306f8c775b1ca2c171103d5032b99e Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Sat, 28 Dec 2024 17:11:26 +0200 Subject: [PATCH] fix(walls): contains de-reference --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/walls.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0fd744f..229bd95 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2375,7 +2375,7 @@ checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" [[package]] name = "hexlab" -version = "0.5.0" +version = "0.5.1" dependencies = [ "bevy", "bevy_reflect", diff --git a/Cargo.toml b/Cargo.toml index befbd65..86a75b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "hexlab" authors = ["Kristofers Solo "] -version = "0.5.0" +version = "0.5.1" edition = "2021" description = "A hexagonal maze generation and manipulation library" repository = "https://github.com/kristoferssolo/hexlab" diff --git a/src/walls.rs b/src/walls.rs index b7e0ae1..9980187 100644 --- a/src/walls.rs +++ b/src/walls.rs @@ -178,11 +178,11 @@ impl Walls { /// assert!(!walls.contains(&EdgeDirection::FLAT_SOUTH)); /// ``` #[inline] - pub fn contains(&self, direction: &T) -> bool + pub fn contains(&self, direction: T) -> bool where T: Into + Copy, { - self.0 & (*direction).into().0 != 0 + self.0 & direction.into().0 != 0 } /// Returns the raw bit representation of the walls