From 7ca2bec67bdf6715e53643b12fa3fe944d459cbc Mon Sep 17 00:00:00 2001 From: recatek Date: Sun, 29 Sep 2024 13:29:26 -0400 Subject: [PATCH] Misc cleanup in docs, code, and dependencies --- Cargo.toml | 2 +- macros/Cargo.toml | 14 +++++++------- src/archetype/storage.rs | 4 ++-- src/lib.rs | 6 ++++-- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f2d1b82..bb34107 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 diff --git a/macros/Cargo.toml b/macros/Cargo.toml index 17c5523..98878a6 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -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" } diff --git a/src/archetype/storage.rs b/src/archetype/storage.rs index 61100a8..9d45d24 100644 --- a/src/archetype/storage.rs +++ b/src/archetype/storage.rs @@ -231,7 +231,7 @@ macro_rules! declare_storage_dynamic_n { where Self: StorageCanResolve { - if let Some(index) = >::resolve_for(self, entity) { + if let Some(index) = self.resolve(entity) { Some($borrow { index, source: self }) } else { None @@ -275,7 +275,7 @@ macro_rules! declare_storage_dynamic_n { where Self: StorageCanResolve { - if let Some(index) = >::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. diff --git a/src/lib.rs b/src/lib.rs index 1a36b64..6d17c6d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -382,7 +382,8 @@ mod macros { /// Note that this is always read-only -- the entity can never be accessed mutably. /// - `&EntityRaw`/`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. @@ -518,7 +519,8 @@ mod macros { /// Note that this is always read-only -- the entity can never be accessed mutably. /// - `&EntityRaw`/`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.