about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-01-26T22·14+0100
committerclbot <clbot@tvl.fyi>2023-01-27T14·06+0000
commitbda5fc58d01d7513180da4456eb279a33f76bc1c (patch)
tree57c8709f7ca02300203f8e859ebc095c7e6a6f22
parentf22b9cb0d7ba4dbab614de0d4331bbe896f23d60 (diff)
feat(tvix/derivation): derive PartialEq for error r/5771
Allows easier to use these errors in test cases.

Change-Id: I8abee3b522909ed4aa4b066499cc48eececbc036
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7937
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
-rw-r--r--tvix/derivation/src/errors.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/derivation/src/errors.rs b/tvix/derivation/src/errors.rs
index 5930c84685b4..a1c49650edef 100644
--- a/tvix/derivation/src/errors.rs
+++ b/tvix/derivation/src/errors.rs
@@ -2,7 +2,7 @@ use thiserror::Error;
 use tvix_store::store_path::ParseStorePathError;
 
 /// Errors that can occur during the validation of Derivation structs.
-#[derive(Debug, Error)]
+#[derive(Debug, Error, PartialEq)]
 pub enum DerivationError {
     // outputs
     #[error("no outputs defined")]
@@ -43,7 +43,7 @@ pub enum DerivationError {
 }
 
 /// Errors that can occur during the validation of a specific [Output] of a [Derviation].
-#[derive(Debug, Error)]
+#[derive(Debug, Error, PartialEq)]
 pub enum OutputError {
     #[error("Invalid ouput path {0}: {1}")]
     InvalidOutputPath(String, ParseStorePathError),