fix(rust): remove unused imports, variables, and dead code causing CI build failures
- Remove unused imports: AtomicBool, Future (provider.rs), debug (executor.rs) - Remove unused import WorkflowScript (workflow.rs) - Remove unused variables: tool_name, t_ctx, t_args (executor.rs) - Remove dead variable class_indent (semantic_search.rs) CI was failing with 'error: could not compile zesdex-infrastructure due to 10 previous errors' caused by -D warnings treating unused code as compilation errors.
This commit is contained in:
@@ -2,7 +2,6 @@ use std::future::Future;
|
||||
use anyhow::Result;
|
||||
use zesdex_application::agent::ToolExecutor;
|
||||
use crate::tools::{all_tools, Tool, ToolCtx};
|
||||
use tracing::debug;
|
||||
|
||||
pub struct InfrastructureToolExecutor {
|
||||
ctx: ToolCtx,
|
||||
@@ -32,17 +31,6 @@ impl ToolExecutor for InfrastructureToolExecutor {
|
||||
async move {
|
||||
match tool_opt {
|
||||
Some(tool) => {
|
||||
// Tool::run is synchronous, so we run it in a blocking task if needed
|
||||
// For now, since they run fast and we are transitioning, we can just block in place.
|
||||
// Or tokio::task::spawn_blocking:
|
||||
let tool_name = tool.name().to_string();
|
||||
let t_ctx = ctx.clone();
|
||||
let t_args = args.clone();
|
||||
|
||||
// Because Tool isn't easily cloned, we might just block on the current thread,
|
||||
// or use tokio::task::block_in_place if we're in a tokio runtime.
|
||||
// But `tool.run` takes `&self`, and we have `&self` borrowed.
|
||||
// For now we just call it directly.
|
||||
tokio::task::block_in_place(move || {
|
||||
tool.run(&ctx, &args)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user