Skip to content

Commit

Permalink
Merge #19
Browse files Browse the repository at this point in the history
19: Maintenance/18/ongoing code maintenance r=azriel91 a=azriel91

Closes #18.

`shred` and `shred-derive` are removed as they are re-exported by `specs`.

Co-authored-by: Azriel Hoh <[email protected]>
  • Loading branch information
bors[bot] and azriel91 authored Feb 12, 2020
2 parents f850c46 + 213e119 commit de74eab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
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

0 comments on commit de74eab

Please sign in to comment.