replace ValueStream with ListStream (#4621)

This commit is contained in:
Michael Angerman 2022-02-24 03:57:31 -08:00 committed by GitHub
parent 21c0f7d738
commit feb4f5c347
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

@ -188,7 +188,7 @@ impl ExternalCommand {
std::thread::spawn(move || { std::thread::spawn(move || {
// If this external is not the last expression, then its output is piped to a channel // If this external is not the last expression, then its output is piped to a channel
// and we create a ValueStream that can be consumed // and we create a ListStream that can be consumed
if redirect_stderr { if redirect_stderr {
let _ = child.stderr.take(); let _ = child.stderr.take();
@ -444,8 +444,8 @@ fn trim_enclosing_quotes(input: &str) -> String {
} }
} }
// Receiver used for the ValueStream // Receiver used for the ListStream
// It implements iterator so it can be used as a ValueStream // It implements iterator so it can be used as a ListStream
struct ChannelReceiver { struct ChannelReceiver {
rx: mpsc::Receiver<Vec<u8>>, rx: mpsc::Receiver<Vec<u8>>,
} }

View file

@ -19,7 +19,7 @@ pub enum Type {
Nothing, Nothing,
Record(Vec<(String, Type)>), Record(Vec<(String, Type)>),
Table, Table,
ValueStream, ListStream,
Unknown, Unknown,
Error, Error,
Binary, Binary,
@ -53,7 +53,7 @@ impl Display for Type {
Type::Nothing => write!(f, "nothing"), Type::Nothing => write!(f, "nothing"),
Type::Number => write!(f, "number"), Type::Number => write!(f, "number"),
Type::String => write!(f, "string"), Type::String => write!(f, "string"),
Type::ValueStream => write!(f, "value stream"), Type::ListStream => write!(f, "list stream"),
Type::Unknown => write!(f, "unknown"), Type::Unknown => write!(f, "unknown"),
Type::Error => write!(f, "error"), Type::Error => write!(f, "error"),
Type::Binary => write!(f, "binary"), Type::Binary => write!(f, "binary"),

View file

@ -195,7 +195,7 @@ impl ListStream {
impl Debug for ListStream { impl Debug for ListStream {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("ValueStream").finish() f.debug_struct("ListStream").finish()
} }
} }