forked from extern/nushell
Move run to be async (#1913)
This commit is contained in:
@@ -17,6 +17,7 @@ struct SplitColumnArgs {
|
||||
|
||||
pub struct SubCommand;
|
||||
|
||||
#[async_trait]
|
||||
impl WholeStreamCommand for SubCommand {
|
||||
fn name(&self) -> &str {
|
||||
"split column"
|
||||
@@ -37,7 +38,7 @@ impl WholeStreamCommand for SubCommand {
|
||||
"splits contents across multiple columns via the separator."
|
||||
}
|
||||
|
||||
fn run(
|
||||
async fn run(
|
||||
&self,
|
||||
args: CommandArgs,
|
||||
registry: &CommandRegistry,
|
||||
|
@@ -6,6 +6,7 @@ use nu_protocol::{ReturnSuccess, Signature, UntaggedValue};
|
||||
#[derive(Clone)]
|
||||
pub struct Command;
|
||||
|
||||
#[async_trait]
|
||||
impl WholeStreamCommand for Command {
|
||||
fn name(&self) -> &str {
|
||||
"split"
|
||||
@@ -19,7 +20,7 @@ impl WholeStreamCommand for Command {
|
||||
"split contents across desired subcommand (like row, column) via the separator."
|
||||
}
|
||||
|
||||
fn run(
|
||||
async fn run(
|
||||
&self,
|
||||
_args: CommandArgs,
|
||||
registry: &CommandRegistry,
|
||||
|
@@ -12,6 +12,7 @@ struct SplitRowArgs {
|
||||
|
||||
pub struct SubCommand;
|
||||
|
||||
#[async_trait]
|
||||
impl WholeStreamCommand for SubCommand {
|
||||
fn name(&self) -> &str {
|
||||
"split row"
|
||||
@@ -29,7 +30,7 @@ impl WholeStreamCommand for SubCommand {
|
||||
"splits contents over multiple rows via the separator."
|
||||
}
|
||||
|
||||
fn run(
|
||||
async fn run(
|
||||
&self,
|
||||
args: CommandArgs,
|
||||
registry: &CommandRegistry,
|
||||
|
Reference in New Issue
Block a user