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/shell.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'crates/common/src/shell.rs') 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, -- cgit v1.3.1