mirror of
https://github.com/kristoferssolo/hexlab.git
synced 2025-10-21 19:40:34 +00:00
fix(walls): contains de-reference
This commit is contained in:
parent
dcbe06fb8c
commit
2b3a375c4f
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -2375,7 +2375,7 @@ checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df"
|
||||
|
||||
[[package]]
|
||||
name = "hexlab"
|
||||
version = "0.5.0"
|
||||
version = "0.5.1"
|
||||
dependencies = [
|
||||
"bevy",
|
||||
"bevy_reflect",
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user