chore(v1.1.9): clippy clean — workspace -D warnings
Surfaced + fixed during the F3 attestation:
- executor-core/sdk/queue.rs: drop redundant .map(|()| ()) call sites;
enqueue_blocking discards QueueMessageId via .map(|_id| ()) (intentional)
- executor-core/sdk/retry.rs: hoist use std::collections::hash_map::DefaultHasher
+ use std::hash::Hasher to the top of the file (clippy::items_after_statements);
replace `as i64` casts with i64::try_from + clear comment about jitter
bound (clippy::cast_possible_wrap)
- executor-core/sdk/invoke.rs: move _LIMITS_IS_COPY const before #[cfg(test)]
mod tests (clippy::items_after_test_module)
- manager-core/dispatcher.rs: dispatch_one_queue gains #[allow(too_many_lines)]
(it's the queue tick's whole logic — split makes it less readable than
the lint); .map(...).unwrap_or(default) → .map_or(default, ...)
- picloud/lib.rs: Limits { trigger_depth_max, ..Limits::default() } via
struct-update instead of let-mut-assign (clippy::field_reassign_with_default)
- tests: r#"..."# → r"..." where there are no `"` inside (clippy::needless_raw_string_hashes);
combine InvokeTarget::Name | InvokeTarget::Path arms with identical bodies
in sdk_invoke.rs (clippy::match_same_arms)
cargo fmt --all -- --check 2>&1 | tail -3: no output (exit 0)
cargo clippy --workspace --all-targets --all-features -- -D warnings:
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.41s
Workspace lib smoke: 432 passing (306 manager-core + 74 executor-core + 34 shared + 18 orchestrator-core).
DB-gated E2E (against docker compose postgres on localhost:15432):
queue_e2e: 4 ok / invoke_e2e: 4 ok / retry_e2e: 3 ok / migration_queue_messages: 4 ok / schema_snapshot: 1 ok
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -257,7 +257,9 @@ fn args_to_json(value: &Dynamic) -> Result<Json, Box<EvalAltResult>> {
|
||||
return Ok(serde_json::Number::from_f64(f).map_or(Json::Null, Json::Number));
|
||||
}
|
||||
if value.is_string() {
|
||||
return Ok(Json::String(value.clone().into_string().unwrap_or_default()));
|
||||
return Ok(Json::String(
|
||||
value.clone().into_string().unwrap_or_default(),
|
||||
));
|
||||
}
|
||||
if let Some(arr) = value.clone().try_cast::<Array>() {
|
||||
let mut out = Vec::with_capacity(arr.len());
|
||||
@@ -276,6 +278,14 @@ fn args_to_json(value: &Dynamic) -> Result<Json, Box<EvalAltResult>> {
|
||||
Ok(Json::String(value.to_string()))
|
||||
}
|
||||
|
||||
/// `Limits` is `Copy`; passed by value into `register` so closures take
|
||||
/// owned copies. Hint for readers wondering why it doesn't need `Arc`.
|
||||
#[allow(dead_code)]
|
||||
const _LIMITS_IS_COPY: fn() = || {
|
||||
fn assert_copy<T: Copy>() {}
|
||||
assert_copy::<Limits>();
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
@@ -320,11 +330,3 @@ mod tests {
|
||||
assert_eq!(j, serde_json::json!({ "x": 42 }));
|
||||
}
|
||||
}
|
||||
|
||||
/// `Limits` is `Copy`; passed by value into `register` so closures take
|
||||
/// owned copies. Hint for readers wondering why it doesn't need `Arc`.
|
||||
#[allow(dead_code)]
|
||||
const _LIMITS_IS_COPY: fn() = || {
|
||||
fn assert_copy<T: Copy>() {}
|
||||
assert_copy::<Limits>();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user