Remove ListStream type (#14425)

# Description
List values and list streams have the same type (`list<>`). Rather,
streaming is a separate property of the pipeline/command output. This PR
removes the unnecessary `ListStream` type.

# User-Facing Changes
Should be none, except `random dice` now has a more specific output
type.
This commit is contained in:
Ian Manske
2024-11-26 17:35:55 -08:00
committed by GitHub
parent 186c08467f
commit 4edce44689
8 changed files with 5 additions and 13 deletions

View File

@ -359,7 +359,6 @@ fn nu_value_to_sqlite_type(val: &Value) -> Result<&'static str, ShellError> {
| Type::Custom(_)
| Type::Error
| Type::List(_)
| Type::ListStream
| Type::Range
| Type::Record(_)
| Type::Signature

View File

@ -12,7 +12,7 @@ impl Command for SubCommand {
fn signature(&self) -> Signature {
Signature::build("random dice")
.input_output_types(vec![(Type::Nothing, Type::ListStream)])
.input_output_types(vec![(Type::Nothing, Type::list(Type::Int))])
.allow_variants_without_examples(true)
.named(
"dice",

View File

@ -15,7 +15,6 @@ impl Command for NuCheck {
Signature::build("nu-check")
.input_output_types(vec![
(Type::String, Type::Bool),
(Type::ListStream, Type::Bool),
(Type::List(Box::new(Type::Any)), Type::Bool),
])
// type is string to avoid automatically canonicalizing the path