Tighten how input streams handle nothing, and related (#2847)

This commit is contained in:
Jonathan Turner
2021-01-03 14:22:44 +13:00
committed by GitHub
parent a5f7600f6f
commit 77f915befe
8 changed files with 99 additions and 63 deletions

View File

@ -1,5 +1,5 @@
use crate::prelude::*;
use futures::stream::{iter, once};
use futures::stream::iter;
use nu_errors::ShellError;
use nu_protocol::{Primitive, Type, UntaggedValue, Value};
use nu_source::{PrettyDebug, Tag, Tagged, TaggedItem};
@ -14,7 +14,7 @@ pub struct InputStream {
impl InputStream {
pub fn empty() -> InputStream {
InputStream {
values: once(async { UntaggedValue::nothing().into_untagged_value() }).boxed(),
values: futures::stream::empty().boxed(),
empty: true,
}
}