-
Notifications
You must be signed in to change notification settings - Fork 747
Rename LeasableBuffer
to SubSlice
#3519
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alistair23
previously approved these changes
Jun 28, 2023
2 tasks
83944be
to
351fd2c
Compare
LeasableBuffer
to Splice
LeasableBuffer
to ~~Splice
~~ SubSlice
LeasableBuffer
to ~~Splice
~~ SubSlice
LeasableBuffer
to SubSlice
hudson-ayers
previously approved these changes
Jul 10, 2023
alistair23
previously approved these changes
Jul 10, 2023
brghena
previously approved these changes
Jul 14, 2023
I support the new name. |
phil-levis
previously approved these changes
Jul 14, 2023
b13b965
351fd2c
to
b13b965
Compare
Added a commit to do the rename in the Tock tree. Blocked on #3503 |
Updated to latest master. Rebase got ugly, so I went with a plain merge. |
ppannuto
previously approved these changes
Jul 19, 2023
alistair23
previously approved these changes
Jul 20, 2023
3d9d964
to
43ad015
Compare
ppannuto
previously approved these changes
Jul 25, 2023
43ad015
to
2599e5d
Compare
Rebased again..., just one small/easy conflict this time at least |
ppannuto
approved these changes
Jul 25, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
component
HIL
This affects a Tock HIL interface.
kernel
sam4l
Change pertains to the SAM4L MCU.
WG-OpenTitan
In the purview of the OpenTitan working group.
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 cod
2CE2
e 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
This pull request renames the
LeasableBuffer
type toSplice
SubSlice
and theLeasableMutableBuffer
type toSpliceMut
SubSliceMut
. This is part of #3504.Why rename?
kernel::leasable_buffer::LeasableBuffer
is clunky to use, hard to type/spell, and doesn't provide enough connection to why its useful. I propose that changing its name to be a riff on "slice" makes it easier to use throughout Tock, akin to howTakeCell
is ubiquitous in Tock despite not being a Rust core type.Why "splice"?Mostly because it sounds like slice. It's also short and maybe catchy. Also, I think a splice (say in a wire) is reminiscent of a what a leasable buffer does: let you edit within a larger object.Why "subslice"?
Discussion seemed to suggest this name was acceptable.
What about "leasable buffer"?
I propose we retain the "leasable buffer" terminology to describe the general idea of a buffer that decouples the underlying buffer memory from the current view of that buffer.
SubSlice
is just one concrete implementation of a leasable buffer. Much like how Roundnet is a game, while Spikeball is one company that sells supplies for the game.Testing Strategy
todo
TODO or Help Wanted
So far I've only changed the content of the leasable_buffer.rs file. I want to get a sense of if we want to go forward with this before changing the name of the file and all current uses of
LeasableBuffer
.Documentation Updated
/docs
, or no updates are required.Formatting
make prepush
.