Remove pub on some command internals (#14636)

Stumbled over unnecessary `pub` `fn action` and `struct Arguments` when
reworking `into bits` in #14634

Stuff like this should be local until proven otherwise and then named
approrpiately.
This commit is contained in:
Stefan Holderbach 2024-12-19 19:42:18 +01:00 committed by GitHub
parent f2e8c391a2
commit dc0ac8e917
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
use nu_cmd_base::input_handler::{operate, CmdArgument};
use nu_engine::command_prelude::*;
pub struct Arguments {
struct Arguments {
cell_paths: Option<Vec<CellPath>>,
compact: bool,
}
@ -142,7 +142,7 @@ fn into_binary(
}
}
pub fn action(input: &Value, _args: &Arguments, span: Span) -> Value {
fn action(input: &Value, _args: &Arguments, span: Span) -> Value {
let value = match input {
Value::Binary { .. } => input.clone(),
Value::Int { val, .. } => Value::binary(val.to_ne_bytes().to_vec(), span),

View File

@ -116,7 +116,7 @@ impl Command for SubCommand {
}
}
pub fn action(input: &Value, _args: &CellPathOnlyArgs, span: Span) -> Value {
fn action(input: &Value, _args: &CellPathOnlyArgs, span: Span) -> Value {
let value_span = input.span();
match input {
Value::Filesize { .. } => input.clone(),

View File

@ -4,7 +4,7 @@ use nu_cmd_base::input_handler::{operate, CmdArgument};
use nu_engine::command_prelude::*;
use nu_protocol::Config;
pub struct Arguments {
struct Arguments {
cell_paths: Option<Vec<CellPath>>,
config: Arc<Config>,
}