Fix pre-existing lint warnings

Remove unused set_event_callback on MockExecutionEnvironment and
replace always-true u64 >= 0 comparisons with is_u64() checks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-02-27 12:09:48 -05:00
parent ae236a383a
commit 38caf9166f
2 changed files with 2 additions and 6 deletions

View file

@ -46,10 +46,6 @@ impl MockExecutionEnvironment {
}
impl MockExecutionEnvironment {
pub fn set_event_callback(&mut self, cb: crate::execution_env::ExecEnvEventCallback) {
self.event_callback = Some(cb);
}
fn emit(&self, event: crate::execution_env::ExecutionEnvEvent) {
if let Some(ref cb) = self.event_callback {
cb(event);

View file

@ -389,7 +389,7 @@ mod tests {
let timing_path = logs_root.path().join("script_node").join("script_timing.json");
let content = std::fs::read_to_string(&timing_path).unwrap();
let json: serde_json::Value = serde_json::from_str(&content).unwrap();
assert!(json["duration_ms"].as_u64().unwrap() >= 0);
assert!(json["duration_ms"].is_u64());
assert_eq!(json["exit_code"], 0);
assert_eq!(json["timed_out"], false);
}
@ -442,7 +442,7 @@ mod tests {
let timing_path = logs_root.path().join("script_node").join("script_timing.json");
let content = std::fs::read_to_string(&timing_path).unwrap();
let json: serde_json::Value = serde_json::from_str(&content).unwrap();
assert!(json["duration_ms"].as_u64().unwrap() >= 0);
assert!(json["duration_ms"].is_u64());
assert_eq!(json["exit_code"], serde_json::Value::Null);
assert_eq!(json["timed_out"], true);
}