[Merged by Bors] - Added missing details to SystemParam Local documentation.#7106
[Merged by Bors] - Added missing details to SystemParam Local documentation.#7106iiYese wants to merge 2 commits intobevyengine:mainfrom
Conversation
…al lifetimes in code.
alice-i-cecile
left a comment
There was a problem hiding this comment.
Small feedback for clarity, then LGTM.
james7132
left a comment
There was a problem hiding this comment.
Approval contingent on the resolution of the currently open comment.
| /// If multiple [`SystemParam`]s within the same system each specify the same local type | ||
| /// each will get their own local. | ||
| /// | ||
| /// The supplied lifetime parameter is the [`SystemParam`]s `'s` lifetime. |
There was a problem hiding this comment.
IMO this comment is unnecessary, simply renaming the lifetime to 's is good enough.
There was a problem hiding this comment.
While just having 's does express the information it expresses it in a manner that is easy to miss. And given the cost of missing that information
Users can get complicated incorrect suggested fixes if they pass the wrong lifetime
I think it is worth repeating once in a more explicit visible fashion.
There was a problem hiding this comment.
Still not convinced that it's necessary, since that comment isn't adding any information that you can't gather just from glancing at the type.
This isn't a significant complaint though, so I won't try and block on it or anything.
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
# Objective `SystemParam` `Local`s documentation currently leaves out information that should be documented. - What happens when multiple `SystemParam`s within the same system have the same `Local` type. - What lifetime parameter is expected by `Local`. ## Solution - Added sentences to documentation to communicate this information. - Renamed `Local` lifetimes in code to `'s` where they previously were not. Users can get complicated incorrect suggested fixes if they pass the wrong lifetime. Some instance of the code had `'w` indicating the expected lifetime might not have been known to those that wrote the code either. Co-authored-by: iiYese <83026177+iiYese@users.noreply.github.com>
…#7106) # Objective `SystemParam` `Local`s documentation currently leaves out information that should be documented. - What happens when multiple `SystemParam`s within the same system have the same `Local` type. - What lifetime parameter is expected by `Local`. ## Solution - Added sentences to documentation to communicate this information. - Renamed `Local` lifetimes in code to `'s` where they previously were not. Users can get complicated incorrect suggested fixes if they pass the wrong lifetime. Some instance of the code had `'w` indicating the expected lifetime might not have been known to those that wrote the code either. Co-authored-by: iiYese <83026177+iiYese@users.noreply.github.com>
…#7106) # Objective `SystemParam` `Local`s documentation currently leaves out information that should be documented. - What happens when multiple `SystemParam`s within the same system have the same `Local` type. - What lifetime parameter is expected by `Local`. ## Solution - Added sentences to documentation to communicate this information. - Renamed `Local` lifetimes in code to `'s` where they previously were not. Users can get complicated incorrect suggested fixes if they pass the wrong lifetime. Some instance of the code had `'w` indicating the expected lifetime might not have been known to those that wrote the code either. Co-authored-by: iiYese <83026177+iiYese@users.noreply.github.com>
…#7106) # Objective `SystemParam` `Local`s documentation currently leaves out information that should be documented. - What happens when multiple `SystemParam`s within the same system have the same `Local` type. - What lifetime parameter is expected by `Local`. ## Solution - Added sentences to documentation to communicate this information. - Renamed `Local` lifetimes in code to `'s` where they previously were not. Users can get complicated incorrect suggested fixes if they pass the wrong lifetime. Some instance of the code had `'w` indicating the expected lifetime might not have been known to those that wrote the code either. Co-authored-by: iiYese <83026177+iiYese@users.noreply.github.com>
Objective
SystemParamLocals documentation currently leaves out information that should be documented.SystemParams within the same system have the sameLocaltype.Local.Solution
Locallifetimes in code to'swhere they previously were not. Users can get complicated incorrect suggested fixes if they pass the wrong lifetime. Some instance of the code had'windicating the expected lifetime might not have been known to those that wrote the code either.