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 <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
This commit is contained in:
Florian Klink 2023-01-26 23:14:46 +01:00 committed by clbot
parent f22b9cb0d7
commit bda5fc58d0

View file

@ -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),