From f3acb5cc0faf739f09112607bb98b6594184bd8b Mon Sep 17 00:00:00 2001 From: tslil Date: Mon, 24 Aug 2026 20:39:57 +0100 Subject: The big transposition-ing: move from functions as data to data of functions Basically Rust will fight you all the way if you treat it like Haskell, instead work with traits and impls on ZSTs. --- rprt-engine/src/evaluate.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'rprt-engine/src/evaluate.rs') diff --git a/rprt-engine/src/evaluate.rs b/rprt-engine/src/evaluate.rs index 4f567fb..eeb1415 100644 --- a/rprt-engine/src/evaluate.rs +++ b/rprt-engine/src/evaluate.rs @@ -1,7 +1,7 @@ use crate::{ expression::{Composite, HookKind}, - selection::{Selection, SelectionError, VectoriseError}, - selection_functions::{evaluate_selection_function, SFError}, + selection::Selection, + selection_functions::{SelectionFunctionError, evaluate_selection_function}, state::{EditorState, GroupedChangeError, StateChange, StateResult}, text::Text, }; @@ -11,9 +11,7 @@ use thiserror::Error; #[derive(Error, Debug)] pub enum EvaluationError { #[error("{0}")] - SelectionFunctionError(VectoriseError), - #[error("{0}")] - SelectionUnionError(SelectionError), + SelectionFunctionError(SelectionFunctionError), #[error("Error in processing group {0}")] GroupError(GroupedChangeError), #[error("Invalid right-only application")] @@ -152,7 +150,7 @@ fn _eval( } .map_err(EvaluationError::GroupError)?; - let sel = Selection::union(selections).map_err(EvaluationError::SelectionUnionError)?; + let sel = Selection::union(selections); Ok((sel, states)) } } -- cgit v1.2.3