tock-cells/OptionalCell: rename get-method to extract #2533
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Overview
As an OptionalCell is designed to look like a Cell which can also be empty, the get method as currently implemented does not match the expected behavior (as it will return an
Option<T>
instead of aT
). Furthermore, asOptionalCell::set
takes simply aT
(not wrapped in anOption
),get
should not return anOption<T>
.Accordingly, this commit renames the
OptionalCell::get
method toextract
, to distinguish it from theCell::get
method.Fixes: a845aa8 ("tock-cells/OptionalCell: add get-method...") (GitHub PR #2531)
Suggested-by: Brad Campbell [email protected]
Signed-off-by: Leon Schuermann [email protected]
Testing Strategy
This pull request was tested by compiling.
TODO or Help Wanted
A discussion about the right method name to use.
Documentation Updated
Updated the relevant files inno updates are required./docs
, orFormatting
make prepush
.