diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-03-20 22:21:56 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-03-20 22:21:56 +0800 |
| commit | ab6be7968b25afb57fc428695693484ad8576718 (patch) | |
| tree | e4af27964f195a18a678844dbe71c0aaa182b5dc /utils/src/legacy/env.rs | |
| parent | 6b22f7b7694fce530f84ba94c65c057450cca626 (diff) | |
Refactor code to use modern Rust idioms and fix clippy lints
Diffstat (limited to 'utils/src/legacy/env.rs')
| -rw-r--r-- | utils/src/legacy/env.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/utils/src/legacy/env.rs b/utils/src/legacy/env.rs index 1834cd3..b4ad089 100644 --- a/utils/src/legacy/env.rs +++ b/utils/src/legacy/env.rs @@ -67,10 +67,7 @@ pub fn auto_update_outdate() -> i64 { } match std::env::var("JV_OUTDATED_MINUTES") { - Ok(value) => match value.trim().parse::<i64>() { - Ok(num) => num, - Err(_) => -1, - }, + Ok(value) => value.trim().parse::<i64>().unwrap_or(-1), Err(_) => -1, } } |
