Commit 28acba3
committed
Auto merge of rust-lang#115460 - zachs18:borrowedcursor_write_no_panic, r=dtolnay
Don't panic in `<BorrowedCursor as io::Write>::write`
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](https://doc.rust-lang.org/src/std/io/impls.rs.html#349).
(cc `@ChayimFriedman2` rust-lang#78485 (comment))
(I'm not sure if this needs an ACP? since it's not changing the "API", just what the function does)1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
310 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
| |||
0 commit comments