-
-
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
Make timestep mutable #2637
Make timestep mutable #2637
Conversation
I this is a fine change by itself, but it feels like there should be a solution which is more integrated into the ECS itself, somehow Like these locks should not be needed, and instead the mutability 'locking' could be managed by the scheduler. |
69b0cd4
to
80c1e71
Compare
@@ -83,24 +95,14 @@ impl FixedTimestep { | |||
} | |||
} | |||
|
|||
pub fn with_label(mut self, label: &str) -> Self { | |||
self.state.label = Some(label.to_string()); | |||
pub fn with_label(mut self, label: impl Into<String>) -> Self { |
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.
this impl Into<String>
change is irrelevant, it saves an extra string clone when label String is created on the fly and user just want to hand over ownership, which is not allowed with a &str parameter
@maniwani, what do you want to do with this one? |
I think we can tackle this issue in #5752 instead. |
Objective
Solution