hive-c0re/swarm-*: drop clippy allows and dedupe unix_now + KV open_or_create
No behaviour change. Casts replaced by try_from / Duration math; schedules.rs reuses agent_renewal::unix_now; the five swarm-queue-client KV open-or-create copies share one private kv::open_or_create.
This commit is contained in:
parent
f53ccb2740
commit
b874d21cda
1 changed files with 74 additions and 133 deletions
|
|
@ -154,8 +154,7 @@ fn register_instruments(provider: &SdkMeterProvider, snapshot: Arc<Mutex<Vec<Con
|
|||
if let Ok(g) = snap.lock() {
|
||||
for c in g.iter() {
|
||||
if let Some(usec) = c.cpu_time_usec {
|
||||
#[allow(clippy::cast_precision_loss)]
|
||||
obs.observe(usec as f64 / 1_000_000.0, &attrs(c));
|
||||
obs.observe(Duration::from_micros(usec).as_secs_f64(), &attrs(c));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue