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]]
name = "hexlab"
version = "0.5.0"
version = "0.5.1"
dependencies = [
"bevy",
"bevy_reflect",

View File

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

View File

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