Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@ 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.15", default-features = false }
shred = { version = "0.9", default-features = false }
shrev = "1.1"
shred-derive = "0.6"
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"]
parallel = ["specs/parallel", "shred/parallel", "hibitset/parallel"]
nightly = ["specs/nightly", "shred/nightly"]
parallel = ["specs/parallel", "hibitset/parallel"]
7 changes: 2 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@
/// ```
///
extern crate hibitset;
extern crate shred;
#[macro_use]
extern crate shred_derive;
extern crate shrev;
extern crate specs;

Expand Down Expand Up @@ -168,7 +165,7 @@ impl<P> Hierarchy<P> {
///
/// 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)
}

Expand Down Expand Up @@ -292,7 +289,7 @@ impl<P> Hierarchy<P> {
.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);
Expand Down