mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-19 02:12:10 +08:00
refactor: improve code quality with clippy fixes and standardized logging
- Replace dangerous unwrap()/expect() calls with proper error handling - Standardize logging from log:: to logging\! macro with Type:: classifications - Fix app handle panics with graceful fallback patterns - Improve error resilience across 35+ modules without breaking functionality - Reduce clippy warnings from 300+ to 0 in main library code
This commit is contained in:
@@ -60,7 +60,13 @@ impl ProxyRequestCache {
|
||||
expires_at: Instant::now() + ttl,
|
||||
};
|
||||
let _ = cell.set(entry);
|
||||
Arc::clone(&cell.get().unwrap().value)
|
||||
// Safe to unwrap here as we just set the value
|
||||
Arc::clone(
|
||||
&cell
|
||||
.get()
|
||||
.unwrap_or_else(|| unreachable!("Cell value should exist after set"))
|
||||
.value,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user