aboutsummaryrefslogtreecommitdiff
path: root/rprt-engine/src/evaluate.rs
diff options
context:
space:
mode:
authortslil <tslil@posteo.de>2026-08-24 20:39:57 +0100
committertslil <tslil@posteo.de>2026-08-24 21:39:25 +0100
commitf3acb5cc0faf739f09112607bb98b6594184bd8b (patch)
tree9f60aeda21a775f9d34ed8a70fffd9be638f27ce /rprt-engine/src/evaluate.rs
parent72a5e0fc968e2bea9f7d348c7189ebc15a5b15d3 (diff)
The big transposition-ing: move from functions as data to data of functionsHEADmain
Basically Rust will fight you all the way if you treat it like Haskell, instead work with traits and impls on ZSTs.
Diffstat (limited to 'rprt-engine/src/evaluate.rs')
-rw-r--r--rprt-engine/src/evaluate.rs10
1 files changed, 4 insertions, 6 deletions
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<SFError>),
- #[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))
}
}