about summary refs log tree commit diff stats
path: root/crates/core/src/expressions/mod.rs
diff options
context:
space:
mode:
authorsuperwhiskers <[email protected]>2025-12-17 21:22:37 -0600
committersuperwhiskers <[email protected]>2026-01-04 22:23:01 -0600
commit54e988aa3d31fb21d3397758f4b71d084e1a1130 (patch)
tree8cef7d5a61946a1c90707e60e5022a11022f421d /crates/core/src/expressions/mod.rs
parente12b1f4459aee80ee333e90e3b56a3b09f81ae3e (diff)
downloadazimuth-54e988aa3d31fb21d3397758f4b71d084e1a1130.tar.gz
azimuth-54e988aa3d31fb21d3397758f4b71d084e1a1130.tar.bz2
azimuth-54e988aa3d31fb21d3397758f4b71d084e1a1130.zip
simple union-find implementation HEAD canon
Change-Id: I32b78b3eee68205032591578fca70c366a6a6964
Diffstat (limited to 'crates/core/src/expressions/mod.rs')
-rw-r--r--crates/core/src/expressions/mod.rs22
1 files changed, 10 insertions, 12 deletions
diff --git a/crates/core/src/expressions/mod.rs b/crates/core/src/expressions/mod.rs
index 5ffb5a6..eadd55d 100644
--- a/crates/core/src/expressions/mod.rs
+++ b/crates/core/src/expressions/mod.rs
@@ -1040,7 +1040,7 @@ where
 
 /// Representation of an error that occurred within [`Expression`].
 #[non_exhaustive]
-#[derive(PartialEq, Eq)]
+#[derive(Clone, PartialEq, Eq)]
 #[cfg_attr(feature = "core-fmt", derive(Debug))]
 pub enum Error {
     /// Memory reservation error.
@@ -1093,6 +1093,10 @@ impl error::Error for Error {}
 
 #[cfg(all(test, feature = "core-error"))]
 mod test {
+    #![allow(clippy::arithmetic_side_effects)]
+    #![allow(clippy::indexing_slicing)]
+    #![allow(clippy::unreachable)]
+    #![allow(clippy::wildcard_enum_match_arm)]
     #![allow(clippy::expect_used)]
 
     use super::*;
@@ -1258,7 +1262,10 @@ mod test {
         type Transition = ExpressionTransition;
 
         fn init_state() -> BoxedStrategy<Self::State> {
-            //TODO: randomly initialize state
+            //NOTE: we could randomly initialize state. i don't think this is
+            //      necessary to test this sufficiently, but if we ever do, we
+            //      also need to tweak the constructor of the [`Expression`]
+            //      to replicate one from the reference state
             Just(Self::State::default()).boxed()
         }
 
@@ -1436,17 +1443,8 @@ mod test {
         type Reference = ExpressionReference;
 
         fn init_test(
-            ref_state: &<Self::Reference as ReferenceStateMachine>::State,
+            _ref_state: &<Self::Reference as ReferenceStateMachine>::State,
         ) -> Self::SystemUnderTest {
-            /*let mut expr = Expression {
-                inner: Vec::new(),
-                interns: Vec::new(),
-                root: ref_state.root.map(NodeIndexInternal),
-            };
-
-            for node in ref_state.nodes {
-                //TODO: finish replicating state over here
-            }*/
             ExpressionWrapper::Closed(Expression::new())
         }