refactor(app): 处理器测试夹具用 StepView 别名,过 clippy::type_complexity

clippy --all-targets -D warnings 报 very complex type(RefCell<Vec<(usize, String, Vec<String>, usize)>>),
抽 pub(super) type StepView 别名,语义不变。
This commit is contained in:
AskaEth committed 2026-11-01 09:14:01 +08:00
1 parent b0f747074f
commit 3d9372029e
1 file changed
+5 -2
@@ -29,6 +29,9 @@ use crate::host::meter::Meter;
static SEQ: AtomicUsize = AtomicUsize::new(0);
/// 一步的计划视图(序号 / 坐标 / 参数 / classpath 条数)。
pub(super) type StepView = (usize, String, Vec<String>, usize);
/// 一段 cases 的公共环境:临时数据根 + 引擎 + 进度通道。
pub(super) struct Harness {
dir: PathBuf,
@@ -104,7 +107,7 @@ pub(super) struct Fake {
pub(super) java: Option<JavaRuntime>,
pub(super) run_error: Option<ProcessorError>,
calls: RefCell<Vec<&'static str>>,
steps: RefCell<Vec<(usize, String, Vec<String>, usize)>>,
steps: RefCell<Vec<StepView>>,
}
impl Fake {
@@ -123,7 +126,7 @@ impl Fake {
}
/// 被组出来的每步(序号 / 坐标 / 参数 / classpath 条数)。
pub(super) fn steps(&self) -> Vec<(usize, String, Vec<String>, usize)> {
pub(super) fn steps(&self) -> Vec<StepView> {
self.steps.borrow().clone()
}
}