Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/leudz/shipyard
Browse files Browse the repository at this point in the history
  • Loading branch information
leudz committed Dec 5, 2020
2 parents d06f59e + 90d5bb8 commit f65c896
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
name = "shipyard"
readme = "README.md"
repository = "https://github.com/leudz/shipyard"
version = "0.4.0"
version = "0.4.1"

[workspace]
members = ["bunny_demo", "tutorial"]
Expand Down
16 changes: 4 additions & 12 deletions src/sparse_set/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,12 +590,8 @@ impl<T> SparseSet<T> {
b: EntityId,
f: F,
) -> Result<R, error::Apply> {
let a_index = self
.index_of(a)
.ok_or_else(|| error::Apply::MissingComponent(a))?;
let b_index = self
.index_of(b)
.ok_or_else(|| error::Apply::MissingComponent(b))?;
let a_index = self.index_of(a).ok_or(error::Apply::MissingComponent(a))?;
let b_index = self.index_of(b).ok_or(error::Apply::MissingComponent(b))?;

if a_index != b_index {
if self.metadata.update.is_some() {
Expand Down Expand Up @@ -647,12 +643,8 @@ impl<T> SparseSet<T> {
b: EntityId,
f: F,
) -> Result<R, error::Apply> {
let a_index = self
.index_of(a)
.ok_or_else(|| error::Apply::MissingComponent(a))?;
let b_index = self
.index_of(b)
.ok_or_else(|| error::Apply::MissingComponent(b))?;
let a_index = self.index_of(a).ok_or(error::Apply::MissingComponent(a))?;
let b_index = self.index_of(b).ok_or(error::Apply::MissingComponent(b))?;

if a_index != b_index {
if self.metadata.update.is_some() {
Expand Down

0 comments on commit f65c896

Please sign in to comment.