Skip to content

Commit

Permalink
refactor: remove REST server related code (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Jun 28, 2023
1 parent 8eaf7b9 commit 167c91f
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 417 deletions.
22 changes: 1 addition & 21 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
pub mod common;
pub mod db;
pub mod server;
pub mod sv;

use clap::{Args, Parser, Subcommand};
Expand Down Expand Up @@ -30,12 +29,10 @@ struct Cli {
#[allow(clippy::large_enum_variant)]
#[derive(Debug, Subcommand)]
enum Commands {
/// Database-related commands.
/// Database building related commands.
Db(Db),
/// SV filtration related commands.
Sv(Sv),
/// Server-related commands.
Server(Server),
}

/// Parsing of "db *" sub commands.
Expand Down Expand Up @@ -70,20 +67,6 @@ enum SvCommands {
Query(sv::query::Args),
}

/// Enum supporting the parsing of "server *" sub commands.
#[derive(Debug, Subcommand)]
enum ServerCommands {
Rest(server::rest::Args),
}
/// Parsing of "sv *" sub commands.
#[derive(Debug, Args)]
#[command(args_conflicts_with_subcommands = true)]
struct Server {
/// The sub command to run
#[command(subcommand)]
command: ServerCommands,
}

fn main() -> Result<(), anyhow::Error> {
let cli = Cli::parse();

Expand Down Expand Up @@ -120,9 +103,6 @@ fn main() -> Result<(), anyhow::Error> {
sv::query::run(&cli.common, args)?;
}
},
Commands::Server(server) => match &server.command {
ServerCommands::Rest(args) => server::rest::run(&cli.common, args)?,
},
}

Ok::<(), anyhow::Error>(())
Expand Down
3 changes: 0 additions & 3 deletions src/server/mod.rs

This file was deleted.

293 changes: 0 additions & 293 deletions src/server/rest/actix_server.rs

This file was deleted.

Loading

0 comments on commit 167c91f

Please sign in to comment.