-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Don't panic in <BorrowedCursor as io::Write>::write
#115460
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
Conversation
r? @thomcc (rustbot has picked a reviewer for you, use r? to override) |
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 makes sense to me!
@thomcc gentle ping? Should this get another reviewer? |
I'm going to take the liberty of assigning this to someone from libs-api since this is technically a user-facing change, even if it merely fixes a bug. r? libs-api |
This is a very minor API change, but ultimately I think the new behavior is better than the old one. It is also consistent with other @rfcbot fcp merge |
Team member @Amanieu has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
Should libs be on this FCP? |
Hmm probably not but at this point I don't think it really hurts. |
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (28acba3): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 663.194s -> 662.725s (-0.07%) |
Instead of panicking if the BorrowedCursor does not have enough capacity for the whole buffer, just return a short write, like
<&mut [u8] as io::Write>::write
does.(cc @ChayimFriedman2 #78485 (comment))
(I'm not sure if this needs an ACP? since it's not changing the "API", just what the function does)