From bda5fc58d01d7513180da4456eb279a33f76bc1c Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Thu, 26 Jan 2023 23:14:46 +0100 Subject: feat(tvix/derivation): derive PartialEq for error Allows easier to use these errors in test cases. Change-Id: I8abee3b522909ed4aa4b066499cc48eececbc036 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7937 Autosubmit: flokli Reviewed-by: tazjin Tested-by: BuildkiteCI --- tvix/derivation/src/errors.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tvix') 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), -- cgit 1.4.1