From 0bcb8e7bd8aefb089ad88f5ebfd7364ae81cdf06 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Mon, 20 Jul 2026 18:23:39 +0200 Subject: chore(server): Remove warnings --- crates/common/src/lib.rs | 1 - crates/common/src/shell.rs | 4 +++- crates/common/src/tls.rs | 15 --------------- 3 files changed, 3 insertions(+), 17 deletions(-) delete mode 100644 crates/common/src/tls.rs (limited to 'crates/common/src') diff --git a/crates/common/src/lib.rs b/crates/common/src/lib.rs index d886520d..8bd18456 100644 --- a/crates/common/src/lib.rs +++ b/crates/common/src/lib.rs @@ -54,5 +54,4 @@ macro_rules! new_uuid { pub mod api; pub mod record; pub mod shell; -pub mod tls; pub mod utils; diff --git a/crates/common/src/shell.rs b/crates/common/src/shell.rs index 8bab806a..a57250e2 100644 --- a/crates/common/src/shell.rs +++ b/crates/common/src/shell.rs @@ -1,4 +1,4 @@ -#[derive(PartialEq)] +#[derive(PartialEq, Clone, Copy, Debug)] pub enum Shell { Sh, Bash, @@ -30,12 +30,14 @@ impl std::fmt::Display for Shell { } impl Shell { + #[must_use] pub fn from_env() -> Self { std::env::var("ATUIN_SHELL").map_or(Self::Unknown, |shell| { Self::from_string(shell.trim().to_lowercase().as_str()) }) } + #[must_use] pub fn from_string(name: &str) -> Self { match name { "bash" => Self::Bash, diff --git a/crates/common/src/tls.rs b/crates/common/src/tls.rs deleted file mode 100644 index e8c840e0..00000000 --- a/crates/common/src/tls.rs +++ /dev/null @@ -1,15 +0,0 @@ -use std::sync::Once; - -static INIT: Once = Once::new(); - -/// Ensure the rustls crypto provider (ring) is installed. -/// -/// Must be called before creating any reqwest clients. Safe to call -/// multiple times — only the first call installs the provider. -pub fn ensure_crypto_provider() { - INIT.call_once(|| { - rustls::crypto::ring::default_provider() - .install_default() - .expect("Failed to install rustls crypto provider"); - }); -} -- cgit v1.3.1