From 6c246a53085611bd5e1f4a56477c3996f7e21f4d Mon Sep 17 00:00:00 2001 From: Shunichiro Nomura Date: Sun, 11 Oct 2026 10:09:56 +0900 Subject: [PATCH] refactor: remove unused eval public accessors --- crates/graphcal-eval/src/eval/runtime.rs | 6 ------ crates/graphcal-eval/src/eval/types.rs | 17 ----------------- crates/graphcal-eval/src/host_fns.rs | 6 ------ 3 files changed, 29 deletions(-) diff --git a/crates/graphcal-eval/src/eval/runtime.rs b/crates/graphcal-eval/src/eval/runtime.rs index 713b48aca..84d910cdf 100644 --- a/crates/graphcal-eval/src/eval/runtime.rs +++ b/crates/graphcal-eval/src/eval/runtime.rs @@ -68,12 +68,6 @@ impl RuntimeEvaluation { pub fn has_errors(&self) -> bool { self.errors.values().any(RuntimeUnavailable::has_failure) || self.result.has_errors() } - - /// Display-aware result for the directly evaluated root DAG. - #[must_use] - pub const fn result(&self) -> &EvalResult { - &self.result - } } /// Evaluate a plan with one row of runtime parameter bindings, then assemble diff --git a/crates/graphcal-eval/src/eval/types.rs b/crates/graphcal-eval/src/eval/types.rs index 6e0aacd6d..f16e28cb8 100644 --- a/crates/graphcal-eval/src/eval/types.rs +++ b/crates/graphcal-eval/src/eval/types.rs @@ -226,23 +226,6 @@ impl Value { } } - /// Get the dimension of a real or complex quantity. - /// - /// # Errors - /// - /// Returns [`ValueError`] if this is not a `Quantity` or `Complex` value. - pub fn dimension(&self) -> Result { - match self { - Self::Quantity { dimension, .. } | Self::Complex { dimension, .. } => { - Ok(dimension.clone()) - } - other => Err(ValueError { - expected: "Quantity or Complex", - actual: other.variant_description(), - }), - } - } - /// Get the value formatted for display: in display units if available, otherwise SI. /// /// # Errors diff --git a/crates/graphcal-eval/src/host_fns.rs b/crates/graphcal-eval/src/host_fns.rs index 0dffef2f8..768cda6b1 100644 --- a/crates/graphcal-eval/src/host_fns.rs +++ b/crates/graphcal-eval/src/host_fns.rs @@ -113,12 +113,6 @@ impl HostArray { pub(crate) fn values(&self) -> &[f64] { &self.values } - - /// Consume into shape and values. - #[must_use] - pub fn into_parts(self) -> (Vec, Vec) { - (self.shape, self.values) - } } /// One raw value a host function returns, SI-flat.