-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Copy over docs for Condition
trait from PR #10718
#10748
Copy over docs for Condition
trait from PR #10718
#10748
Conversation
/// Type parameter in return type can be omitted by calling [`IntoSystem::into_system`], | ||
/// but usually have to be specified when passing a condition to a function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a button to suggest code edits.
Better replace "can be omitted" with something like "can be set to <()>
".
/// ``` | ||
/// # use bevy_ecs::schedule::Condition; | ||
/// # use bevy_ecs::system::IntoSystem; | ||
/// fn not_condition<Marker>(a: impl Condition<Marker>) -> impl Condition { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we need <()>
in Condition<()>
.
Condition
trait from PR #10718
Thanks. I noticed that the other examples have hidden code blocks for testing. Should this one have it as well? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a test as part of this would be nice, but not required IMO.
Objective
Resolves #10743.
Solution
Copied over the documentation written by @stepancheng from PR #10718.
I left out the lines from the doctest where
<()>
is removed, as that seemed to be the part people couldn't decide on whether to keep or not.