Skip to content

Commit

Permalink
Auto merge of #115460 - zachs18:borrowedcursor_write_no_panic, r=dtolnay
Browse files Browse the repository at this point in the history
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/rust#78485 (comment))

(I'm not sure if this needs an ACP? since it's not changing the "API", just what the function does)
  • Loading branch information
bors committed Nov 8, 2023
2 parents b730b63 + a400ef4 commit d5b60f7
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit d5b60f7

Please sign in to comment.