diff --git a/crates/nu-command/src/database/commands/into_sqlite.rs b/crates/nu-command/src/database/commands/into_sqlite.rs index fcfa228f3b..3236f90999 100644 --- a/crates/nu-command/src/database/commands/into_sqlite.rs +++ b/crates/nu-command/src/database/commands/into_sqlite.rs @@ -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 diff --git a/crates/nu-command/src/random/dice.rs b/crates/nu-command/src/random/dice.rs index b11eb59e3e..32768a9937 100644 --- a/crates/nu-command/src/random/dice.rs +++ b/crates/nu-command/src/random/dice.rs @@ -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", diff --git a/crates/nu-command/src/system/nu_check.rs b/crates/nu-command/src/system/nu_check.rs index 59982dfaa7..945440cca4 100644 --- a/crates/nu-command/src/system/nu_check.rs +++ b/crates/nu-command/src/system/nu_check.rs @@ -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 diff --git a/crates/nu-parser/src/type_check.rs b/crates/nu-parser/src/type_check.rs index e5f2a22921..fd57acd5ca 100644 --- a/crates/nu-parser/src/type_check.rs +++ b/crates/nu-parser/src/type_check.rs @@ -29,8 +29,6 @@ pub fn type_compatible(lhs: &Type, rhs: &Type) -> bool { match (lhs, rhs) { (Type::List(c), Type::List(d)) => type_compatible(c, d), - (Type::ListStream, Type::List(_)) => true, - (Type::List(_), Type::ListStream) => true, (Type::List(c), Type::Table(table_fields)) => { if matches!(**c, Type::Any) { return true; diff --git a/crates/nu-protocol/src/pipeline/pipeline_data.rs b/crates/nu-protocol/src/pipeline/pipeline_data.rs index 75449f547f..af56533e91 100644 --- a/crates/nu-protocol/src/pipeline/pipeline_data.rs +++ b/crates/nu-protocol/src/pipeline/pipeline_data.rs @@ -109,7 +109,7 @@ impl PipelineData { /// than would be returned by [`Value::get_type()`] on the result of /// [`.into_value()`](Self::into_value). /// - /// Specifically, a `ListStream` results in [`list stream`](Type::ListStream) rather than + /// Specifically, a `ListStream` results in `list` rather than /// the fully complete [`list`](Type::List) type (which would require knowing the contents), /// and a `ByteStream` with [unknown](crate::ByteStreamType::Unknown) type results in /// [`any`](Type::Any) rather than [`string`](Type::String) or [`binary`](Type::Binary). @@ -117,7 +117,7 @@ impl PipelineData { match self { PipelineData::Empty => Type::Nothing, PipelineData::Value(value, _) => value.get_type(), - PipelineData::ListStream(_, _) => Type::ListStream, + PipelineData::ListStream(_, _) => Type::list(Type::Any), PipelineData::ByteStream(stream, _) => stream.type_().into(), } } diff --git a/crates/nu-protocol/src/ty.rs b/crates/nu-protocol/src/ty.rs index 55da6422b9..d1b6f7140a 100644 --- a/crates/nu-protocol/src/ty.rs +++ b/crates/nu-protocol/src/ty.rs @@ -23,7 +23,6 @@ pub enum Type { Float, Int, List(Box), - ListStream, #[default] Nothing, Number, @@ -121,7 +120,6 @@ impl Type { Type::Nothing => SyntaxShape::Nothing, Type::Record(entries) => SyntaxShape::Record(mk_shape(entries)), Type::Table(columns) => SyntaxShape::Table(mk_shape(columns)), - Type::ListStream => SyntaxShape::List(Box::new(SyntaxShape::Any)), Type::Any => SyntaxShape::Any, Type::Error => SyntaxShape::Any, Type::Binary => SyntaxShape::Binary, @@ -151,7 +149,6 @@ impl Type { Type::Nothing => String::from("nothing"), Type::Number => String::from("number"), Type::String => String::from("string"), - Type::ListStream => String::from("list-stream"), Type::Any => String::from("any"), Type::Error => String::from("error"), Type::Binary => String::from("binary"), @@ -209,7 +206,6 @@ impl Display for Type { Type::Nothing => write!(f, "nothing"), Type::Number => write!(f, "number"), Type::String => write!(f, "string"), - Type::ListStream => write!(f, "list-stream"), Type::Any => write!(f, "any"), Type::Error => write!(f, "error"), Type::Binary => write!(f, "binary"), diff --git a/crates/nu_plugin_example/src/commands/for_each.rs b/crates/nu_plugin_example/src/commands/for_each.rs index e66a3841dc..20bf7e9f12 100644 --- a/crates/nu_plugin_example/src/commands/for_each.rs +++ b/crates/nu_plugin_example/src/commands/for_each.rs @@ -23,7 +23,7 @@ impl PluginCommand for ForEach { fn signature(&self) -> Signature { Signature::build(self.name()) - .input_output_type(Type::ListStream, Type::Nothing) + .input_output_type(Type::list(Type::Any), Type::Nothing) .required( "closure", SyntaxShape::Closure(Some(vec![SyntaxShape::Any])), diff --git a/crates/nu_plugin_example/src/commands/generate.rs b/crates/nu_plugin_example/src/commands/generate.rs index de63849aef..d2d4e7a5af 100644 --- a/crates/nu_plugin_example/src/commands/generate.rs +++ b/crates/nu_plugin_example/src/commands/generate.rs @@ -26,7 +26,7 @@ impl PluginCommand for Generate { fn signature(&self) -> Signature { Signature::build(self.name()) - .input_output_type(Type::Nothing, Type::ListStream) + .input_output_type(Type::Nothing, Type::list(Type::Any)) .required( "initial", SyntaxShape::Any,