Skip to content

Commit

Permalink
--wip-- [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
spencewenski committed Jun 29, 2024
1 parent 68e9c0c commit 3c29326
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
2 changes: 0 additions & 2 deletions src/api/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ where
_state: std::marker::PhantomData<S>,
}

// todo: figure out how to mock RunCommand
//
#[cfg(test)]
mockall::mock! {
pub TestCli<S>
Expand Down
4 changes: 2 additions & 2 deletions src/api/cli/roadster/health.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::api::core::health::health_check;
use crate::app::context::AppContext;
use crate::app::App;
use crate::error::RoadsterResult;

use async_trait::async_trait;
use axum::extract::FromRef;
use clap::Parser;
use serde_derive::Serialize;
Expand All @@ -13,7 +13,7 @@ use tracing::info;
#[non_exhaustive]
pub struct HealthArgs {}

// #[async_trait]
#[async_trait]
impl<A, S> RunRoadsterCommand<A, S> for HealthArgs
where
S: Clone + Send + Sync + 'static,
Expand Down
5 changes: 3 additions & 2 deletions src/api/cli/roadster/migrate.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use anyhow::anyhow;
use async_trait::async_trait;

use axum::extract::FromRef;
use clap::{Parser, Subcommand};
Expand All @@ -18,7 +19,7 @@ pub struct MigrateArgs {
pub command: MigrateCommand,
}

// #[async_trait]
#[async_trait]
impl<A, S> RunRoadsterCommand<A, S> for MigrateArgs
where
S: Clone + Send + Sync + 'static,
Expand Down Expand Up @@ -48,7 +49,7 @@ pub enum MigrateCommand {
Status,
}

// #[async_trait]
#[async_trait]
impl<A, S> RunRoadsterCommand<A, S> for MigrateCommand
where
S: Clone + Send + Sync + 'static,
Expand Down
11 changes: 6 additions & 5 deletions src/api/cli/roadster/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use crate::app::context::AppContext;
use crate::app::App;
use crate::config::environment::Environment;
use crate::error::RoadsterResult;
use async_trait::async_trait;

use axum::extract::FromRef;
use clap::{Parser, Subcommand};
Expand All @@ -27,7 +28,7 @@ pub mod print_config;
/// Internal version of [RunCommand][crate::cli::RunCommand] that uses the [RoadsterCli] and
/// [AppContext] instead of the consuming app's versions of these objects. This (slightly) reduces
/// the boilerplate required to implement a Roadster command.
// #[async_trait]
#[async_trait]
pub(crate) trait RunRoadsterCommand<A, S>
where
S: Clone + Send + Sync + 'static,
Expand Down Expand Up @@ -69,7 +70,7 @@ impl RoadsterCli {
}
}

// #[async_trait]
#[async_trait]
impl<A, S> RunRoadsterCommand<A, S> for RoadsterCli
where
S: Clone + Send + Sync + 'static,
Expand All @@ -95,7 +96,7 @@ pub enum RoadsterCommand {
Roadster(RoadsterArgs),
}

// #[async_trait]
#[async_trait]
impl<A, S> RunRoadsterCommand<A, S> for RoadsterCommand
where
S: Clone + Send + Sync + 'static,
Expand All @@ -116,7 +117,7 @@ pub struct RoadsterArgs {
pub command: RoadsterSubCommand,
}

// #[async_trait]
#[async_trait]
impl<A, S> RunRoadsterCommand<A, S> for RoadsterArgs
where
S: Clone + Send + Sync + 'static,
Expand All @@ -128,7 +129,7 @@ where
}
}

// #[async_trait]
#[async_trait]
impl<A, S> RunRoadsterCommand<A, S> for RoadsterSubCommand
where
S: Clone + Send + Sync + 'static,
Expand Down
3 changes: 2 additions & 1 deletion src/api/cli/roadster/print_config.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use async_trait::async_trait;
use axum::extract::FromRef;
use clap::Parser;
use serde_derive::{Deserialize, Serialize};
Expand Down Expand Up @@ -31,7 +32,7 @@ pub enum Format {
TomlPretty,
}

// #[async_trait]
#[async_trait]
impl<A, S> RunRoadsterCommand<A, S> for PrintConfigArgs
where
S: Clone + Send + Sync + 'static,
Expand Down

0 comments on commit 3c29326

Please sign in to comment.