Move run to be async (#1913)

This commit is contained in:
Jonathan Turner
2020-05-29 20:22:52 +12:00
committed by GitHub
parent fbc0dd57e9
commit 360e8340d1
134 changed files with 305 additions and 157 deletions

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,