Skip to content
This repository was archived by the owner on Nov 27, 2022. It is now read-only.

Commit 1547f70

Browse files
committed
Update to hecs 0.3
1 parent 4c1687f commit 1547f70

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ legion = { git = "https://github.com/TomGillen/legion" }
1616
#legion_typeuuid = { git = "https://github.com/TomGillen/legion_typeuuid" }
1717
legion_2_4 = { package = "legion", version = "0.2.4" }
1818
bevy_ecs = "0.1"
19-
hecs = "0.2"
19+
hecs = "0.3"
2020
shipyard = "0.4"
2121
specs = {version = "0.16.1", features = ["serde"] }
2222
specs-derive = "0.4.1"

src/hecs/frag_iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl Benchmark {
2323
}
2424

2525
pub fn run(&mut self) {
26-
for (_, mut data) in self.0.query::<&mut Data>().iter() {
26+
for (_, mut data) in self.0.query_mut::<&mut Data>() {
2727
data.0 *= 2.0;
2828
}
2929
}

src/hecs/simple_iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl Benchmark {
3131
}
3232

3333
pub fn run(&mut self) {
34-
for (_, (velocity, position)) in self.0.query::<(&Velocity, &mut Position)>().iter() {
34+
for (_, (velocity, position)) in self.0.query_mut::<(&Velocity, &mut Position)>() {
3535
position.0 += velocity.0;
3636
}
3737
}

0 commit comments

Comments
 (0)