From 12bc92df3588b6c17151fe9ff0ce10a37c70f2ad Mon Sep 17 00:00:00 2001 From: Maximilian Roos <5635139+max-sixty@users.noreply.github.com> Date: Wed, 2 Dec 2020 02:00:30 -0800 Subject: [PATCH] Make run_block public (#2772) --- crates/nu-cli/src/commands/classified/block.rs | 2 +- crates/nu-cli/src/evaluation_context.rs | 2 +- crates/nu-cli/src/lib.rs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/nu-cli/src/commands/classified/block.rs b/crates/nu-cli/src/commands/classified/block.rs index ee2aa282d1..06a2be9dc6 100644 --- a/crates/nu-cli/src/commands/classified/block.rs +++ b/crates/nu-cli/src/commands/classified/block.rs @@ -9,7 +9,7 @@ use nu_protocol::hir::{Block, ClassifiedCommand, Commands}; use nu_protocol::{ReturnSuccess, Scope, UntaggedValue, Value}; use std::sync::atomic::Ordering; -pub(crate) async fn run_block( +pub async fn run_block( block: &Block, ctx: &mut EvaluationContext, mut input: InputStream, diff --git a/crates/nu-cli/src/evaluation_context.rs b/crates/nu-cli/src/evaluation_context.rs index 6809ebc04b..70a130098d 100644 --- a/crates/nu-cli/src/evaluation_context.rs +++ b/crates/nu-cli/src/evaluation_context.rs @@ -27,7 +27,7 @@ pub struct EvaluationContext { } impl EvaluationContext { - pub(crate) fn registry(&self) -> &CommandRegistry { + pub fn registry(&self) -> &CommandRegistry { &self.registry } diff --git a/crates/nu-cli/src/lib.rs b/crates/nu-cli/src/lib.rs index 241bc300e7..0cb0d63ba3 100644 --- a/crates/nu-cli/src/lib.rs +++ b/crates/nu-cli/src/lib.rs @@ -47,6 +47,7 @@ pub use crate::cli::{ run_pipeline_standalone, run_vec_of_pipelines, LineResult, }; pub use crate::command_registry::CommandRegistry; +pub use crate::commands::classified::block::run_block; pub use crate::commands::command::{ whole_stream_command, CommandArgs, EvaluatedWholeStreamCommandArgs, Example, WholeStreamCommand, };