Skip to content

Fix README issues #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ fn show_tooltips(
```

Alternatively, if you expect to only have component implementing the trait for each entity,
you can use the filter [`One`](https://docs.rs/bevy-trait-query/latest/bevy_trait_query/struct.One.html). This has significantly better performance than iterating
you can use the filter [`One`](https://docs.rs/bevy-trait-query/latest/bevy_trait_query/one/struct.One.html). This has significantly better performance than iterating
over all trait impls.

```rust
Expand Down
17 changes: 1 addition & 16 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
//! ```
//!
//! Alternatively, if you expect to only have component implementing the trait for each entity,
//! you can use the filter [`One`](crate::One). This has significantly better performance than iterating
//! you can use the filter [`One`](crate::one::One). This has significantly better performance than iterating
//! over all trait impls.
//!
//! ```ignore
Expand All @@ -189,21 +189,6 @@
//! # bevy::ecs::system::assert_is_system(show_tooltips);
//! ```
//!
//! Trait queries support basic change detection filtration. So to get all the components that
//! implement the target trait, and have also changed in some way since the last tick, you can:
//! ```ignore
//! fn show_tooltips(
//! tooltips: Query<ChangedAll<&dyn Tooltip>>
//! // ...
//! ) {
//! for tooltip in &tooltips {
//! println!("changed tool tips: {}", tooltip.tooltip());
//! }
//! }
//! ```
//!
//! Similarly, there exist `ChangedOne`, `AddedOne`, and `AddedAll`.
//!
//! # Performance
//!
//! The performance of trait queries is quite competitive. Here are some benchmarks for simple cases:
Expand Down