Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from 2 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
11a64a1
don't panic in BorrowedCursor::write
zachs18 Sep 2, 2023
eed8918
bump some deps
klensy Nov 7, 2023
f2fd8ad
Document clippy_config in nightly-rustc docs
Alexendoo Nov 7, 2023
fcdd99e
Add -Zcross-crate-inline-threshold=yes
saethlin Nov 7, 2023
783d4b8
Clarify `space_between`.
nnethercote Oct 31, 2023
438b9a6
More tests for token stream pretty-printing with adjacent punctuation.
nnethercote Oct 31, 2023
a573880
coverage: Rename the `run-coverage` test mode to `coverage-run`
Zalathar Nov 2, 2023
b9b7982
Add AIX platform-support doc
ecnelises Aug 1, 2023
93b1c1f
handle the case when the change-id isn't found
onur-ozkan Oct 27, 2023
820e833
bootstrap: improve `fn check_version`
onur-ozkan Oct 27, 2023
966c102
bootstrap: add more detail on change-id comments
onur-ozkan Nov 7, 2023
ca1ca41
Rollup merge of #114316 - ecnelises:aix_doc, r=workingjubilee
fmease Nov 8, 2023
7b11383
Rollup merge of #115460 - zachs18:borrowedcursor_write_no_panic, r=dt…
fmease Nov 8, 2023
cb6a53c
Rollup merge of #117263 - onur-ozkan:change-id-fix, r=saethlin
fmease Nov 8, 2023
823395e
Rollup merge of #117650 - saethlin:inline-me-please, r=davidtwco
fmease Nov 8, 2023
d27beed
Rollup merge of #117663 - klensy:bump-deps, r=davidtwco
fmease Nov 8, 2023
733e271
Rollup merge of #117667 - Alexendoo:doc-clippy-config, r=albertlarsan68
fmease Nov 8, 2023
01ff59a
Rollup merge of #117698 - nnethercote:space_between-2, r=petrochenkov
fmease Nov 8, 2023
d180529
Rollup merge of #117700 - Zalathar:rename-run-coverage, r=onur-ozkan
fmease Nov 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions library/std/src/io/readbuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,9 @@ impl<'a> BorrowedCursor<'a> {

impl<'a> Write for BorrowedCursor<'a> {
fn write(&mut self, buf: &[u8]) -> Result<usize> {
self.append(buf);
Ok(buf.len())
let amt = cmp::min(buf.len(), self.capacity());
self.append(&buf[..amt]);
Ok(amt)
}

#[inline]
Expand Down