| Age | Commit message (Collapse) | Author | Lines |
|
Fixes https://github.com/rust-lang/rust/issues/49233.
|
|
This subsumes the need for an explicit is_empty function, and provides
access to the buffered data itself which has been requested from time to
time.
|
|
|
|
fix off-by-one error
Fixes https://github.com/rust-lang/rust/issues/47325.
|
|
BufRead: Only flush the internal buffer if seeking outside of it.
Fixes #31100
r? @dtolnay
|
|
|
|
|
|
|
|
Fixes https://github.com/rust-lang/rust/issues/42468.
|
|
|
|
|
|
Like #43008 (f668999), but _much more aggressive_.
|
|
|
|
|
|
This is an API that allows types to indicate that they can be passed
buffers of uninitialized memory which can improve performance.
|
|
* Since the switch to pulldown-cmark reference links need a blank line
before the URLs.
* Reference link references are not case sensitive.
* Doc comments need to be indented uniformly otherwise rustdoc gets
confused.
|
|
See #38644.
|
|
Previously the `LineWriter` could successfully write some bytes but then fail to
report that it has done so. Additionally, an erroneous flush after a successful
write was permanently ignored. This commit fixes these two issues by (a)
maintaining a `need_flush` flag to indicate whether a flush should be the first
operation in `LineWriter::write` and (b) avoiding returning an error once some
bytes have been successfully written.
Closes #37807
|
|
Otherwise the optimizer can't be sure that pos <= cap. Added a paranoid debug_assert to ensure correctness instead.
|
|
add missing urls for BufWriter and BufReader
r? @steveklabnik
|
|
|
|
[tracking issue](https://github.com/rust-lang/rust/issues/27749)
|
|
`BufRead` comments, in the `Seek` trait implementation, was talking
about allocating 8 *ebibytes*. It was a typo, the correct unit is
*exbibytes*, since *ebibytes* don't even exist. The calculation is
correct, though.
|
|
|
|
A long time ago non-panicking `unwrap` methods were renamed to `into_inner` in this Pull Request: https://github.com/rust-lang/rust/pull/19149
Looks like this doc comment was not updated however.
|
|
The first branch of the if statement already checks if `buf.len() >= self.buf.capacity()`, which makes the `cmp::min(buf.len(), self.buf.capacity())` redundant: the result will always be `buf.len()`. Therefore, we can pass the `buf` slice directly into `Write::write`.
|
|
|
|
|
|
Automated conversion using the untry tool [1] and the following command:
```
$ find -name '*.rs' -type f | xargs untry
```
at the root of the Rust repo.
[1]: https://github.com/japaric/untry
|
|
|
|
If LineWriter fails to flush, return the number of bytes written instead
of an error.
Fixes #32085
|
|
The deny(warnings) attribute is now enabled for tests so we need to weed out
these warnings as well.
|
|
Saves a word, and also prevents the impl from accidentally changing the
buffer length.
r? @alexcrichton
|
|
Saves a word, and also prevents the impl from accidentally changing the
buffer length.
|
|
We don't want to write the same data twice.
Closes #30888
|
|
In 8d90d3f36871a00023cc1f313f91e351c287ca15 `BufStream`, the only
consumer of `InternalBufWriter`, was removed. As implied by the name,
this type is private, hence it is currently dead code.
|
|
|
|
|
|
|
|
|
|
This commit removes all unstable and deprecated functions in the standard
library. A release was recently cut (1.3) which makes this a good time for some
spring cleaning of the deprecated functions.
|
|
This isn't a standard header, and the other docs don't use it, so let's remove it.
|
|
This isn't a standard header, and the other docs don't use it, so let's remove it.
|
|
Many of these have long since reached their stage of being obsolete, so this
commit starts the removal process for all of them. The unstable features that
were deprecated are:
* cmp_partial
* fs_time
* hash_default
* int_slice
* iter_min_max
* iter_reset_fuse
* iter_to_vec
* map_in_place
* move_from
* owned_ascii_ext
* page_size
* read_and_zero
* scan_state
* slice_chars
* slice_position_elem
* subslice_offset
|
|
Mostly adding examples.
r? @alexcrichton
|
|
Beef up the struct docs, add examples for the methods.
r? @alexcrichton
|
|
Beef up the struct docs, add examples for the methods.
|
|
Mostly through adding examples.
|
|
Mostly adding examples.
|
|
I happened past a comment that asked for functionality that we now have.
|