-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Partially revert #107200 #114897
Partially revert #107200 #114897
Conversation
`Ok(0)` is indeed something the caller may interpret as an error, but that's the *correct* thing to return if the writer can't accept any more bytes.
r? @m-ou-se (rustbot has picked a reviewer for you, use r? to override) |
I have no voting power but nonetheless I’m strongly against such API. |
@mina86 It's the current stable API in std's own implementations of |
No matter how you slice it, std is inconsistent. With StorageFull finally being added, we can change the documentation to encourage its use and consistency in future code. |
StorageFull is being used correctly there: it's returned by the OS for a full disk, and Rust passes it along to the caller. |
@mina86 We're not reverting this to say that That doesn't mean that the resulting wording in the docs here is final. We might still want to add a note that recommends using a StorageFull error in certain cases, for example. (But that's something for after the 1.72 release. And probably only when ErrorKind::StorageFull itself is stable.) @bors r+ |
⌛ Testing commit 5210f48 with merge a9270420c3e25469f73da2c3a5a4db03c6d286bc... |
☀️ Test successful - checks-actions |
👀 Test was successful, but fast-forwarding failed: 422 Update is not a fast forward |
@bors retry |
Finished benchmarking commit (a9270420c3e25469f73da2c3a5a4db03c6d286bc): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
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: 634.954s -> 633.803s (-0.18%) |
@bors rollup |
Rollup of 5 pull requests Successful merges: - rust-lang#113715 (Unstable Book: update `lang_items` page and split it) - rust-lang#114897 (Partially revert rust-lang#107200) - rust-lang#114913 (Fix suggestion for attempting to define a string with single quotes) - rust-lang#114931 (Revert PR rust-lang#114052 to fix invalid suggestion) - rust-lang#114944 (update `thiserror` to version >= 1.0.46) r? `@ghost` `@rustbot` modify labels: rollup
[beta] backports * Upgrade std to gimli 0.28.0 rust-lang#114825 * Partially revert rust-lang#107200 rust-lang#114897 * Permit pre-evaluated constants in simd_shuffle rust-lang#113529 r? cuviper
Ok(0)
is indeed something the caller may interpret as an error, butthat's the correct thing to return if the writer can't accept any more
bytes.