Skip to content

Commit

Permalink
simplify option conversion
Browse files Browse the repository at this point in the history
Co-authored-by: Kalle Ahlström <[email protected]>
  • Loading branch information
Esgrove and kahlstrm authored Sep 15, 2023
1 parent 3efa556 commit 1e5c763
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,5 @@ fn get_s3_data_keys(name: &str) -> [String; 3] {

/// Return possible env variable value as Option
fn get_env_variable(name: &str) -> Option<String> {
match env::var(name) {
Ok(value) => Some(value),
Err(_) => None,
}
env::var(name).ok()
}

0 comments on commit 1e5c763

Please sign in to comment.