diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-07-20 18:23:39 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-07-20 18:24:17 +0200 |
| commit | 0bcb8e7bd8aefb089ad88f5ebfd7364ae81cdf06 (patch) | |
| tree | 83e098b147f25670ff15f7bcd1ac72dc1115b3b6 /crates/common/src/shell.rs | |
| parent | chore: Remove some warnings (cargo fix) (diff) | |
| download | atuin-0bcb8e7bd8aefb089ad88f5ebfd7364ae81cdf06.zip | |
chore(server): Remove warnings
Diffstat (limited to '')
| -rw-r--r-- | crates/common/src/shell.rs | 4 |
1 files changed, 3 insertions, 1 deletions
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, |
