libs: Fix clippy legacy_numeric_constants

Fix `legacy_numeric_constants` clippy warning as suggested by rust
1.85.1, since `mem-agent` is now a member of `libs` workspace.

```console
error: usage of a legacy numeric constant
   --> mem-agent/src/compact.rs:132:47
    |
132 |         if self.config.compact_force_times == std::u64::MAX {
    |                                               ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
    |
132 |         if self.config.compact_force_times == u64::MAX {
    |                                               ~~~~~~~~
```

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
Ruoqing He
2025-08-27 02:09:55 +00:00
parent 3d146a525c
commit 2986eb3a78

View File

@@ -63,7 +63,7 @@ impl Default for Config {
compact_sec_max: 5 * 60,
compact_order: PAGE_REPORTING_MIN_ORDER,
compact_threshold: 2 << PAGE_REPORTING_MIN_ORDER,
compact_force_times: std::u64::MAX,
compact_force_times: u64::MAX,
}
}
}
@@ -129,7 +129,7 @@ impl CompactCore {
}
fn need_force_compact(&self) -> bool {
if self.config.compact_force_times == std::u64::MAX {
if self.config.compact_force_times == u64::MAX {
return false;
}