Skip to content

Commit

Permalink
fix: make Provider trait Send+Sync and update formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbrink committed Feb 9, 2025
1 parent 5d92a7a commit 5c64c3c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async fn main() -> Result<()> {

match cli.command {
Commands::Run { command, .. } => run_command(command, final_config).await,
Commands::Watch { pid: _pid, .. } => watch_process(final_config).await,
Commands::Watch { pid: _pid, .. } => watch_process(final_config),
}
}

Expand Down Expand Up @@ -122,7 +122,7 @@ async fn run_command(command: Vec<String>, config: Config) -> Result<()> {
}
}

async fn watch_process(_config: Config) -> Result<()> {
fn watch_process(_config: Config) -> Result<()> {
// TODO: Implement watch process command
todo!("Watch process not yet implemented")
}
2 changes: 1 addition & 1 deletion src/providers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::config::ApiConfig;
use anyhow::Result;

/// Trait defining the interface for rate limit providers
pub trait Provider: std::fmt::Debug + std::any::Any {
pub trait Provider: std::fmt::Debug + std::any::Any + Send + Sync {
/// Get the current rate limits from the provider
/// Get the current rate limits for the API provider
///
Expand Down
4 changes: 2 additions & 2 deletions tests/cli_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async fn test_run_command_basic() -> Result<()> {
])
.output()?;

assert!(output.status.success(), "Command failed: {:?}", output);
assert!(output.status.success(), "Command failed: {output:?}");
Ok(())
}

Expand Down Expand Up @@ -51,7 +51,7 @@ async fn test_run_command_rate_limits() -> Result<()> {
])
.output()?;

assert!(output.status.success(), "Command failed: {:?}", output);
assert!(output.status.success(), "Command failed: {output:?}");
Ok(())
}

Expand Down

0 comments on commit 5c64c3c

Please sign in to comment.