Rename IoStream to OutDest (#12433)

# Description
I spent a while trying to come up with a good name for what is currently
`IoStream`. Looking back, this name is not the best, because it:
1. Implies that it is a stream, when it all it really does is specify
the output destination for a stream/pipeline.
2. Implies that it handles input and output, when it really only handles
output.

So, this PR renames `IoStream` to `OutDest` instead, which should be
more clear.
This commit is contained in:
Ian Manske
2024-04-09 16:48:32 +00:00
committed by GitHub
parent 6536fa5ff7
commit d7ba8872bf
28 changed files with 263 additions and 260 deletions

View File

@ -1,5 +1,5 @@
use crate::ExternalCommand;
use nu_protocol::{IoStream, Span, Spanned};
use nu_protocol::{OutDest, Span, Spanned};
use std::{collections::HashMap, path::PathBuf};
pub(crate) fn gen_command(
@ -29,8 +29,8 @@ pub(crate) fn gen_command(
name,
args,
arg_keep_raw: vec![false; number_of_args],
out: IoStream::Inherit,
err: IoStream::Inherit,
out: OutDest::Inherit,
err: OutDest::Inherit,
env_vars: env_vars_str,
}
}

View File

@ -79,7 +79,7 @@ fn with_env(
let capture_block: Closure = call.req(engine_state, stack, 1)?;
let block = engine_state.get_block(capture_block.block_id);
let mut stack = stack.captures_to_stack_preserve_stdio(capture_block.captures);
let mut stack = stack.captures_to_stack_preserve_out_dest(capture_block.captures);
let mut env: HashMap<String, Value> = HashMap::new();