1
Fork 0

Rollup merge of #101165 - ldm0:drain_to_iter, r=cjgillot

Use more `into_iter` rather than `drain(..)`

Clearer semantic.
This commit is contained in:
Matthias Krüger 2022-08-31 21:30:13 +02:00 committed by GitHub
commit e5356712b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 16 deletions

View file

@ -555,7 +555,7 @@ impl TokenStreamBuilder {
// Get the first stream, which will become the result stream.
// If it's `None`, create an empty stream.
let mut iter = streams.drain(..);
let mut iter = streams.into_iter();
let mut res_stream_lrc = iter.next().unwrap().0;
// Append the subsequent elements to the result stream, after