about summary refs log tree commit diff
path: root/tvix/derivation/src/tests/mod.rs
diff options
context:
space:
mode:
authorJürgen Hahn <mail.jhahn@gmail.com>2023-01-02T20·00+0100
committerjrhahn <mail.jhahn@gmail.com>2023-01-02T20·55+0000
commit31973890a9ee60f50c1426ef7173bd4238234268 (patch)
treeef5cf4964fe08b2e0391769c0590738eb184c258 /tvix/derivation/src/tests/mod.rs
parente6862413ca032acc94615bd969c8fec49a1a1dc5 (diff)
refactor(tvix/derivation): refactor the derivation serialization r/5564
This refactors the code to serialize a derivation. The original code
has beed moved to seperate crates for better code structure.

Change-Id: I3b1a6b134428fcbc9930c330bced8ec3610cfb4c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7733
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/derivation/src/tests/mod.rs')
-rw-r--r--tvix/derivation/src/tests/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/derivation/src/tests/mod.rs b/tvix/derivation/src/tests/mod.rs
index 9c8ffd061c11..800806926976 100644
--- a/tvix/derivation/src/tests/mod.rs
+++ b/tvix/derivation/src/tests/mod.rs
@@ -1,4 +1,4 @@
-use super::{serialize_derivation, Derivation};
+use crate::derivation::Derivation;
 use std::fs::File;
 use std::io::Read;
 use std::path::Path;
@@ -19,7 +19,7 @@ fn assert_derivation_ok(path_to_drv_file: &str) {
     let derivation: Derivation = serde_json::from_str(&data).expect("JSON was not well-formatted");
 
     let mut serialized_derivation = String::new();
-    serialize_derivation(derivation, &mut serialized_derivation).unwrap();
+    derivation.serialize(&mut serialized_derivation).unwrap();
 
     let expected = read_file(path_to_drv_file);