feat(tvix/derivation): derive Default for Derivation
Some of the fields in a Derivation struct stay empty, and manually creating BTreeMap or vec for it is annoying. Derive Default instead, so we can use the defaults instead of writing more by hand. Change-Id: I5d41b4b55c8187cb101eb4266451a470008e0067 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7788 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
This commit is contained in:
parent
f04829a1bb
commit
1e2c859840
2 changed files with 21 additions and 32 deletions
|
|
@ -7,7 +7,7 @@ use std::{collections::BTreeMap, fmt, fmt::Write};
|
|||
use tvix_store::nixbase32::NIXBASE32;
|
||||
use tvix_store::store_path::{ParseStorePathError, StorePath, STORE_DIR};
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Derivation {
|
||||
#[serde(rename = "args")]
|
||||
pub arguments: Vec<String>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue