bevy/crates/bevy_ecs/src
Kanabenki 569e2ac80f
Make builder types take and return Self (#10001)
# Objective

Closes #9955.

Use the same interface for all "pure" builder types: taking and
returning `Self` (and not `&mut Self`).

## Solution

Changed `DynamicSceneBuilder`, `SceneFilter` and `TableBuilder` to take
and return `Self`.

## Changelog

### Changed

- `DynamicSceneBuilder` and `SceneBuilder` methods in `bevy_ecs` now
take and return `Self`.

## Migration guide

When using `bevy_ecs::DynamicSceneBuilder` and `bevy_ecs::SceneBuilder`,
instead of binding the builder to a variable, directly use it. Methods
on those types now consume `Self`, so you will need to re-bind the
builder if you don't `build` it immediately.

Before:
```rust
let mut scene_builder = DynamicSceneBuilder::from_world(&world);
let scene = scene_builder.extract_entity(a).extract_entity(b).build();
```

After:
 ```rust
let scene = DynamicSceneBuilder::from_world(&world)
    .extract_entity(a)
    .extract_entity(b)
    .build();
```
2023-10-09 19:46:17 +00:00
..
entity Use EntityHashMap<Entity, T> for render world entity storage for better performance (#9903) 2023-09-27 08:28:28 +00:00
query Updates for rust 1.73 (#10035) 2023-10-06 00:31:10 +00:00
reflect reflect: TypePath part 2 (#8768) 2023-10-09 19:33:03 +00:00
schedule Updates for rust 1.73 (#10035) 2023-10-06 00:31:10 +00:00
storage Make builder types take and return Self (#10001) 2023-10-09 19:46:17 +00:00
system Updates for rust 1.73 (#10035) 2023-10-06 00:31:10 +00:00
world Updates for rust 1.73 (#10035) 2023-10-06 00:31:10 +00:00
archetype.rs Add a public API to ArchetypeGeneration/Id (#9825) 2023-10-02 12:54:45 +00:00
bundle.rs Fix some nightly warnings (#9672) 2023-09-02 18:35:06 +00:00
change_detection.rs Updates for rust 1.73 (#10035) 2023-10-06 00:31:10 +00:00
component.rs Updates for rust 1.73 (#10035) 2023-10-06 00:31:10 +00:00
event.rs Only run event systems if they have tangible work to do (#7728) 2023-09-24 00:16:33 +00:00
lib.rs Remove useless single tuples and trailing commas (#9720) 2023-09-08 21:46:54 +00:00
removal_detection.rs Hide UnsafeWorldCell::unsafe_world (#9741) 2023-10-02 12:46:43 +00:00