feat(tvix/derivation): derive Clone, Debug, Eq and PartialEq
This allows juggling with Derivation structs in unit tests, and makes it very easy to compare them for equality. Change-Id: I1faf2ec1eefb1a40fcee3c29f04ec47d29f22691 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7758 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
cc626d686c
commit
95c9c2ae8b
2 changed files with 3 additions and 3 deletions
|
@ -7,7 +7,7 @@ use std::{collections::BTreeMap, fmt, fmt::Write, iter::FromIterator};
|
|||
use tvix_store::nixbase32::NIXBASE32;
|
||||
use tvix_store::nixpath::STORE_DIR;
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Derivation {
|
||||
#[serde(rename = "args")]
|
||||
pub arguments: Vec<String>,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
use tvix_store::nixpath::NixPath;
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Output {
|
||||
pub path: String,
|
||||
|
||||
|
@ -9,7 +9,7 @@ pub struct Output {
|
|||
pub hash: Option<Hash>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Hash {
|
||||
#[serde(rename = "hash")]
|
||||
pub digest: String,
|
||||
|
|
Loading…
Reference in a new issue