Return iter from sort by (#2149)

This commit is contained in:
Joseph T. Lyons 2020-07-10 14:49:55 -04:00 committed by GitHub
parent e07a9e4ee7
commit f32ab696d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,13 +73,7 @@ async fn sort_by(
sort(&mut vec, &rest, &tag)?;
let mut values_vec_deque: VecDeque<Value> = VecDeque::new();
for item in vec {
values_vec_deque.push_back(item);
}
Ok(futures::stream::iter(values_vec_deque).to_output_stream())
Ok(futures::stream::iter(vec.into_iter()).to_output_stream())
}
pub fn sort(