rust/library/alloc
Ralf Jung 46bb884cf3
Rollup merge of #76525 - fusion-engineering-forks:string-drain, r=dtolnay
Add as_str() to string::Drain.

Vec's Drain recently [had its `.as_slice()` stabilized](https://github.com/rust-lang/rust/pull/72584), but String's Drain was still missing the analogous `.as_str()`. This adds that.

Also improves the Debug implementation, which now shows the remaining data instead of just `"Drain { .. }"`.
2020-09-19 11:47:47 +02:00
..
benches Clean up vec benches bench_in_place style 2020-09-06 12:00:22 +08:00
src Rollup merge of #76525 - fusion-engineering-forks:string-drain, r=dtolnay 2020-09-19 11:47:47 +02:00
tests Use T::BITS instead of size_of::<T> * 8. 2020-09-19 06:54:42 +02:00
Cargo.toml