From 10498be9d12b33cb02c68ce45efa75261e774254 Mon Sep 17 00:00:00 2001 From: Azriel Hoh Date: Thu, 13 Feb 2020 11:36:09 +1300 Subject: [PATCH 1/3] Updated to `specs` `0.16.0`. --- Cargo.toml | 7 ++----- src/lib.rs | 3 --- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d09872a..5d60c2a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,12 +14,9 @@ keywords = ["specs", "scenegraph", "hierarchy"] [dependencies] hibitset = { version = "0.6", default-features = false } -specs = { version = "0.15", default-features = false } -shred = { version = "0.9", default-features = false } +specs = { version = "0.16", default-features = false, features = ["shred-derive"] } shrev = "1.1" -shred-derive = "0.6" [features] default = ["parallel"] -parallel = ["specs/parallel", "shred/parallel", "hibitset/parallel"] -nightly = ["specs/nightly", "shred/nightly"] +parallel = ["specs/parallel", "hibitset/parallel"] diff --git a/src/lib.rs b/src/lib.rs index 9cd5096..b72ea89 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -42,9 +42,6 @@ /// ``` /// extern crate hibitset; -extern crate shred; -#[macro_use] -extern crate shred_derive; extern crate shrev; extern crate specs; From d93eb0e93a04eb76b984e3864f0e795d6b4fddc5 Mon Sep 17 00:00:00 2001 From: Azriel Hoh Date: Thu, 13 Feb 2020 11:38:40 +1300 Subject: [PATCH 2/3] Ran `cargo upgrade`. --- Cargo.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5d60c2a..656a03e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,9 +13,9 @@ description = "Scene graph type hierarchy abstraction for use with specs" keywords = ["specs", "scenegraph", "hierarchy"] [dependencies] -hibitset = { version = "0.6", default-features = false } -specs = { version = "0.16", default-features = false, features = ["shred-derive"] } -shrev = "1.1" +hibitset = { version = "0.6.2", default-features = false } +specs = { version = "0.16.0", default-features = false, features = ["shred-derive"] } +shrev = "1.1.1" [features] default = ["parallel"] From 213e11956e407089fb22b4d7449df1d025fd0063 Mon Sep 17 00:00:00 2001 From: Azriel Hoh Date: Thu, 13 Feb 2020 11:40:44 +1300 Subject: [PATCH 3/3] Fixed some clippy warnings. --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index b72ea89..bed2f64 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -165,7 +165,7 @@ impl

Hierarchy

{ /// /// This does not include the parent entity you pass in. Parents are guaranteed to be /// prior to their children. - pub fn all_children_iter<'a>(&'a self, entity: Entity) -> SubHierarchyIterator<'a, P> { + pub fn all_children_iter(&self, entity: Entity) -> SubHierarchyIterator<'_, P> { SubHierarchyIterator::new(self, entity) } @@ -289,7 +289,7 @@ impl

Hierarchy

{ .min() .cloned() }) - .unwrap_or(self.sorted.len()); + .unwrap_or_else(|| self.sorted.len()); self.entities.insert(entity.id(), insert_index); if insert_index >= self.sorted.len() { self.sorted.push(entity);