Skip to content

Commit

Permalink
Misc cleanup in docs, code, and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
recatek committed Sep 29, 2024
1 parent 34e8891 commit 7ca2bec
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ wrapping_version = []
[dependencies]
gecs_macros = { version = "0.3.0", path = "macros", default-features = false }

seq-macro = { version = "0.3.5" } # For building "variadic" storage
seq-macro = { version = "0.3" } # For building "variadic" storage
14 changes: 7 additions & 7 deletions macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ proc-macro = true
default = []

[dependencies]
convert_case = { version = "0.6.0" }
proc-macro2 = { version = "1.0.86" }
quote = { version = "1.0.36" }
syn = { version = "2.0.71", features = ["full", "extra-traits"] }
convert_case = { version = "0.6" }
proc-macro2 = { version = "1.0" }
quote = { version = "1.0" }
syn = { version = "2.0", features = ["full", "extra-traits"] }

# For unique generation of query macros
xxhash-rust = { version = "0.8.11", features = ["xxh3"] }
xxhash-rust = { version = "0.8", features = ["xxh3"] }

# Serialization for passing world data to queries
base64 = { version = "0.22.1" }
speedy = { version = "0.8.7" }
base64 = { version = "0.22" }
speedy = { version = "0.8" }
4 changes: 2 additions & 2 deletions src/archetype/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ macro_rules! declare_storage_dynamic_n {
where
Self: StorageCanResolve<K>
{
if let Some(index) = <Self as StorageCanResolve<K>>::resolve_for(self, entity) {
if let Some(index) = self.resolve(entity) {
Some($borrow { index, source: self })
} else {
None
Expand Down Expand Up @@ -275,7 +275,7 @@ macro_rules! declare_storage_dynamic_n {
where
Self: StorageCanResolve<K>
{
if let Some(index) = <Self as StorageCanResolve<K>>::resolve_for(self, entity) {
if let Some(index) = self.resolve(entity) {
unsafe {
// SAFETY: We guarantee that if we successfully resolve, then index < self.len.
// SAFETY: We guarantee that the storage is valid up to self.len.
Expand Down
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,8 @@ mod macros {
/// Note that this is always read-only -- the entity can never be accessed mutably.
/// - `&EntityRaw<A>`/`EntityRawAny`: As above, but using raw handles to the direct position
/// of the entity in its archetype. This can accelerate lookup, but may be invalidated
/// if the archetype changes. See [`EntityRawAny`] for more information.
/// if the archetype changes. See [`EntityRawAny`](crate::entity::EntityRawAny) for more
/// information.
/// - `&Entity<_>`/`&EntityRaw<_>`: When used with the special `_` wildcard, each execution
/// of this query will return a typed (raw) entity handle for the exact archetype matched
/// for this specific execution. This can be used to optimize switched behavior by type.
Expand Down Expand Up @@ -518,7 +519,8 @@ mod macros {
/// Note that this is always read-only -- the entity can never be accessed mutably.
/// - `&EntityRaw<A>`/`EntityRawAny`: As above, but using raw handles to the direct position
/// of the entity in its archetype. This can accelerate lookup, but may be invalidated
/// if the archetype changes. See [`EntityRawAny`] for more information.
/// if the archetype changes. See [`EntityRawAny`](crate::entity::EntityRawAny) for more
/// information.
/// - `&Entity<_>`/`&EntityRaw<_>`: When used with the special `_` wildcard, each execution
/// of this query will return a typed (raw) entity handle for the exact archetype matched
/// for this specific execution. This can be used to optimize switched behavior by type.
Expand Down

0 comments on commit 7ca2bec

Please sign in to comment.