diff options
| author | Fuwn <[email protected]> | 2021-05-04 19:23:25 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-04 19:23:25 +0000 |
| commit | d0f69a96dfa0a1da65b64d1ee79783d95d145675 (patch) | |
| tree | e459ca4f22e27b8a45a4493066d38a345645361b /src | |
| parent | revert(deps): remove dev-dependencies once again (diff) | |
| download | whirl-d0f69a96dfa0a1da65b64d1ee79783d95d145675.tar.xz whirl-d0f69a96dfa0a1da65b64d1ee79783d95d145675.zip | |
style(global): fix clippy complaints
Diffstat (limited to 'src')
| -rw-r--r-- | src/api/mod.rs | 4 | ||||
| -rw-r--r-- | src/cli.rs | 4 | ||||
| -rw-r--r-- | src/main.rs | 6 | ||||
| -rw-r--r-- | src/subs.rs | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/api/mod.rs b/src/api/mod.rs index edbc427..17ffea4 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -3,8 +3,8 @@ mod routes; -pub struct API; -impl API { +pub struct Api; +impl Api { pub fn listen() { let _ = rocket::ignite() .mount("/", routes![routes::index]) @@ -5,8 +5,8 @@ use structopt::clap::{App, AppSettings, Arg, ArgMatches, Shell, SubCommand}; use crate::{config::Config, subs::run}; -pub struct CLI; -impl CLI { +pub struct Cli; +impl Cli { pub fn setup() -> ArgMatches<'static> { let matches = Self::cli().get_matches(); diff --git a/src/main.rs b/src/main.rs index 39212e2..2171243 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,19 +3,19 @@ use std::error::Error; -use whirl::cli::CLI; +use whirl::cli::Cli; #[tokio::main] async fn main() -> Result<(), Box<dyn Error>> { // Environment - let matches = CLI::setup(); + let matches = Cli::setup(); // Logging dotenv::dotenv().ok(); pretty_env_logger::init(); // Execution - CLI::execute(matches).await; + Cli::execute(matches).await; Ok(()) } diff --git a/src/subs.rs b/src/subs.rs index a8bde65..df8dfd1 100644 --- a/src/subs.rs +++ b/src/subs.rs @@ -4,7 +4,7 @@ use std::error::Error; use crate::{ - api::API, + api::Api, config::Config, server::{ distributor::Distributor, @@ -33,7 +33,7 @@ pub async fn run() -> Result<(), Box<dyn Error>> { .await; }), tokio::spawn(async move { - let _ = API::listen(); + let _ = Api::listen(); }), ]; for thread in threads { |