style: address clippy clippy::double_ended_iterator_last, and clippy::manual_ok_err (#2025)

This commit is contained in:
Kalvin C
2025-04-03 10:16:51 -07:00
committed by GitHub
parent 2838ded787
commit 02e29ed131
3 changed files with 3 additions and 5 deletions
+1 -3
View File
@@ -173,10 +173,8 @@ pub async fn get_config(
let config = Config::global();
let value = if let Ok(config_value) = config.get_param::<String>(&query.key) {
Some(config_value)
} else if let Ok(env_value) = std::env::var(&query.key) {
Some(env_value)
} else {
None
std::env::var(&query.key).ok()
};
// Return the value