fix(walls): contains de-reference

This commit is contained in:
Kristofers Solo 2024-12-28 17:11:26 +02:00
parent dcbe06fb8c
commit 2b3a375c4f
3 changed files with 4 additions and 4 deletions

2
Cargo.lock generated
View File

@ -2375,7 +2375,7 @@ checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df"
[[package]] [[package]]
name = "hexlab" name = "hexlab"
version = "0.5.0" version = "0.5.1"
dependencies = [ dependencies = [
"bevy", "bevy",
"bevy_reflect", "bevy_reflect",

View File

@ -1,7 +1,7 @@
[package] [package]
name = "hexlab" name = "hexlab"
authors = ["Kristofers Solo <dev@kristofers.xyz>"] authors = ["Kristofers Solo <dev@kristofers.xyz>"]
version = "0.5.0" version = "0.5.1"
edition = "2021" edition = "2021"
description = "A hexagonal maze generation and manipulation library" description = "A hexagonal maze generation and manipulation library"
repository = "https://github.com/kristoferssolo/hexlab" repository = "https://github.com/kristoferssolo/hexlab"

View File

@ -178,11 +178,11 @@ impl Walls {
/// assert!(!walls.contains(&EdgeDirection::FLAT_SOUTH)); /// assert!(!walls.contains(&EdgeDirection::FLAT_SOUTH));
/// ``` /// ```
#[inline] #[inline]
pub fn contains<T>(&self, direction: &T) -> bool pub fn contains<T>(&self, direction: T) -> bool
where where
T: Into<Self> + Copy, T: Into<Self> + Copy,
{ {
self.0 & (*direction).into().0 != 0 self.0 & direction.into().0 != 0
} }
/// Returns the raw bit representation of the walls /// Returns the raw bit representation of the walls