Skip to content

Commit

Permalink
Merge #506
Browse files Browse the repository at this point in the history
506: Bump versions r=torkleyy a=torkleyy



<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/slide-rs/specs/506)
<!-- Reviewable:end -->


Co-authored-by: Thomas Schaller <[email protected]>
  • Loading branch information
bors[bot] and torkleyy committed Oct 28, 2018
2 parents ea21020 + 013ad3e commit eb43ea6
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 45 deletions.
24 changes: 20 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
# Unreleased
# [Unreleased]

* Generation now internally uses the new `NonZeroI32` from `nonzero_signed`, meaning `Option<Entity>` is the same size as `Entity`.
Note this bumps the minimum supported rust version to 1.28.0 ([#447]).
* Deprecated `world::Bundle` ([#486])

# 0.14.0

* Changed `ConvertSaveload::convert_into` and `ConvertSaveload::convert_from` ([#504])

[#504]: https://github.com/slide-rs/specs/pull/504

# 0.13.0

This release can be skipped; please use `0.14` instead.

* Generation now internally uses the new `NonZeroI32` from `nonzero_signed`, meaning `Option<Entity>` is the same
size as `Entity`. Note this bumps the minimum supported rust version to 1.28.0 ([#447]).
* Improved `saveload` and added custom derive for components with `Entity` ([#460])
* Removed `world::Bundle` ([#486], [#505])
* Updated Chapter 7: Setup to be more explicit, updated examples to follow that methodology ([#487])
* Added some comments to the `saveload` example ([#492])
* Updated dependency versions ([#494])
* FlaggedStorage rewrite with single event channel instead of multiple for ordering. ([#489])
* Make it possible to run on wasm ([#495])

[#447]: https://github.com/slide-rs/specs/pull/447
[#460]: https://github.com/slide-rs/specs/pull/460
[#486]: https://github.com/slide-rs/specs/pull/486
[#487]: https://github.com/slide-rs/specs/pull/487
[#489]: https://github.com/slide-rs/specs/pull/489
[#492]: https://github.com/slide-rs/specs/pull/492
[#494]: https://github.com/slide-rs/specs/pull/494
[#495]: https://github.com/slide-rs/specs/pull/495
[#505]: https://github.com/slide-rs/specs/pull/505

# 0.12.3

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "specs"
version = "0.12.4"
version = "0.14.0"
description = """
Specs is an Entity-Component System library written in Rust.
"""
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Unlike most other ECS libraries out there, it provides
other and you can use barriers to force several stages in system execution
* high performance for real-world applications

Minimum Rust version: 1.21
Minimum Rust version: 1.28

## [Link to the book][book]

Expand Down
2 changes: 1 addition & 1 deletion book/src/02_hello_world.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ First of all, thanks for trying out `specs`. Let's
set it up first. Add the following line to your `Cargo.toml`:

```toml
specs = "0.12.1"
specs = "0.14.0"
```

And add this to your crate root (`main.rs` or `lib.rs`):
Expand Down
2 changes: 1 addition & 1 deletion examples/ordered_track.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ fn main() {
// then you will find the new inserted component rather than the modified one from earlier.
tracked.get_mut(e3).unwrap().0 = 20;
tracked.remove(e3);
tracked.insert(e3, TrackedComponent(10));
tracked.insert(e3, TrackedComponent(10)).unwrap();
}

dispatcher.dispatch(&mut world.res);
Expand Down
2 changes: 1 addition & 1 deletion examples/track.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ fn main() {
.join()
.map(|(e, _)| e)
.collect::<Vec<Entity>>();
world.delete_entities(&entities);
world.delete_entities(&entities).unwrap();

for _ in 0..50 {
world.create_entity().with(TrackedComponent(0)).build();
Expand Down
16 changes: 0 additions & 16 deletions src/world/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -574,15 +574,6 @@ impl World {
}
}

/// Adds the given bundle of resources/components.
#[deprecated(note="Please read the book's chapter on setup: https://slide-rs.github.io/specs/07_setup.html")]
pub fn add_bundle<B>(&mut self, bundle: B)
where
B: Bundle,
{
bundle.add_to_world(self);
}

fn any_storages(&self) -> FetchMut<MetaTable<AnyStorage>> {
self.res.fetch_mut::<MetaTable<AnyStorage>>()
}
Expand Down Expand Up @@ -612,10 +603,3 @@ impl Default for World {
World { res }
}
}

/// Trait used to bundle up resources/components for easy registration with `World`.
#[deprecated(note="Please read the book's chapter on setup: https://slide-rs.github.io/specs/07_setup.html")]
pub trait Bundle {
/// Add resources/components to `world`.
fn add_to_world(self, world: &mut World);
}
20 changes: 0 additions & 20 deletions src/world/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,26 +124,6 @@ fn delete_twice() {
assert!(world.entities().delete(e).is_err());
}

#[test]
fn test_bundle() {
let mut world = World::new();

pub struct SomeResource {
pub v: u32,
}

pub struct TestBundle;

impl Bundle for TestBundle {
fn add_to_world(self, world: &mut World) {
world.add_resource(SomeResource { v: 12 });
}
}

world.add_bundle(TestBundle);
assert_eq!(12, world.read_resource::<SomeResource>().v);
}

#[test]
fn delete_and_lazy() {
let mut world = World::new();
Expand Down

0 comments on commit eb43ea6

Please sign in to comment.