From c05d2850420a2c163b8f62c33a6cef7c0ae1ad8d Mon Sep 17 00:00:00 2001 From: Vladislav Stepanov <8uk.8ak@gmail.com> Date: Fri, 14 Apr 2023 23:18:58 +0400 Subject: Workspace reorder (#868) * Try different workspace structure Move main crate (atuin) to be on the same level with other crates in this workspace * extract common dependencies to the workspace definition * fix base64 v0.21 deprecation warning * questionable: update deps & fix chrono deprecations possible panic sites are unchanged, they're just more visible now * Revert "questionable: update deps & fix chrono deprecations" This reverts commit 993e60f8dea81a1625a04285a617959ad09a0866. --- src/command/server.rs | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 src/command/server.rs (limited to 'src/command/server.rs') diff --git a/src/command/server.rs b/src/command/server.rs deleted file mode 100644 index 495f85d0..00000000 --- a/src/command/server.rs +++ /dev/null @@ -1,44 +0,0 @@ -use tracing_subscriber::{fmt, prelude::*, EnvFilter}; - -use clap::Parser; -use eyre::{Context, Result}; - -use atuin_server::{launch, settings::Settings}; - -#[derive(Parser)] -#[clap(infer_subcommands = true)] -pub enum Cmd { - /// Start the server - Start { - /// The host address to bind - #[clap(long)] - host: Option, - - /// The port to bind - #[clap(long, short)] - port: Option, - }, -} - -impl Cmd { - #[tokio::main] - pub async fn run(self) -> Result<()> { - tracing_subscriber::registry() - .with(fmt::layer()) - .with(EnvFilter::from_default_env()) - .init(); - - let settings = Settings::new().wrap_err("could not load server settings")?; - - match self { - Self::Start { host, port } => { - let host = host - .as_ref() - .map_or(settings.host.clone(), std::string::ToString::to_string); - let port = port.map_or(settings.port, |p| p); - - launch(settings, host, port).await - } - } - } -} -- cgit v1.3.1