mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 08:55:40 +02:00
Make PipelineData helpers collect rawstreams (#969)
This commit is contained in:
@ -103,7 +103,7 @@ fn into_binary(
|
||||
// TODO: in the future, we may want this to stream out, converting each to bytes
|
||||
let output = stream.into_bytes()?;
|
||||
Ok(Value::Binary {
|
||||
val: output,
|
||||
val: output.item,
|
||||
span: head,
|
||||
}
|
||||
.into_pipeline_data())
|
||||
|
@ -154,7 +154,7 @@ fn string_helper(
|
||||
// TODO: in the future, we may want this to stream out, converting each to bytes
|
||||
let output = stream.into_string()?;
|
||||
Ok(Value::String {
|
||||
val: output,
|
||||
val: output.item,
|
||||
span: head,
|
||||
}
|
||||
.into_pipeline_data())
|
||||
|
@ -45,7 +45,7 @@ impl Command for Decode {
|
||||
|
||||
match input {
|
||||
PipelineData::RawStream(stream, ..) => {
|
||||
let bytes: Vec<u8> = stream.into_bytes()?;
|
||||
let bytes: Vec<u8> = stream.into_bytes()?.item;
|
||||
|
||||
let encoding = match Encoding::for_label(encoding.item.as_bytes()) {
|
||||
None => Err(ShellError::SpannedLabeledError(
|
||||
|
Reference in New Issue
Block a user