-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Trim BorrowedCursor
API
#143829
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
base: master
Are you sure you want to change the base?
Trim BorrowedCursor
API
#143829
Conversation
This method was not really useful: at no point one would only need to read the initialized part of the cursor without mutating it.
I assume that this method was there for completeness, but there is hardly any useful use of it: the buffer it gave was not always connected to the start of the cursor and its use required `unsafe` anyway to mark the bytes as initialized.
This enable removing the `start` field, so `BorrowedCursor` fits in a single register. Because `written` is almost always used in difference with another call, this changes nothing else in practice.
I'm surprised by the removal of |
Why for? It gives read-only bytes that you're not supposed to read, just like the buffer of |
I don't think me as a reviewer is the right people to make choices here. Feels like more an unresolved question on a tracking issue -- after all, one can always stabilize a subset and decide whether to remove methods later. r? libs-api |
This PR removes some method from the unstable
BorrowedCursor
type. A rational for each change can be found in the message of each commit.I don't think that an ACP is required for this, please tell me if it is not the case.
Cc #78485 #117693