diff options
author | Peter Kolloch <info@eigenvalue.net> | 2024-02-19T12·19+0700 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-02-19T17·15+0000 |
commit | df73d5f242e3b737d356546450dc883214c14b37 (patch) | |
tree | c0bac45a8711e8ea76ef6e0923c9ef6446fe80f3 /tvix | |
parent | 5777050821ff18ce645f1a75e6fef5a01ff255fd (diff) |
refactor(tvix/nix-compat): Restrict visibility r/7559
Towards https://b.tvl.fyi/issues/264 Change-Id: I323907cb842ed10ddd05b72c285c598b60d213e0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10972 Reviewed-by: flokli <flokli@flokli.de> Autosubmit: Peter Kolloch <info@eigenvalue.net> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix')
-rw-r--r-- | tvix/nix-compat/src/derivation/write.rs | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/tvix/nix-compat/src/derivation/write.rs b/tvix/nix-compat/src/derivation/write.rs index 0981dfccae22..e6df40424ea7 100644 --- a/tvix/nix-compat/src/derivation/write.rs +++ b/tvix/nix-compat/src/derivation/write.rs @@ -65,7 +65,7 @@ fn write_array_elements<S: AsRef<[u8]>>( Ok(()) } -pub fn write_outputs( +pub(crate) fn write_outputs( writer: &mut impl Write, outputs: &BTreeMap<String, Output>, ) -> Result<(), io::Error> { @@ -99,7 +99,7 @@ pub fn write_outputs( Ok(()) } -pub fn write_input_derivations( +pub(crate) fn write_input_derivations( writer: &mut impl Write, input_derivations: &BTreeMap<String, BTreeSet<String>>, ) -> Result<(), io::Error> { @@ -132,7 +132,7 @@ pub fn write_input_derivations( Ok(()) } -pub fn write_input_sources( +pub(crate) fn write_input_sources( writer: &mut impl Write, input_sources: &BTreeSet<String>, ) -> Result<(), io::Error> { @@ -146,17 +146,20 @@ pub fn write_input_sources( Ok(()) } -pub fn write_system(writer: &mut impl Write, platform: &str) -> Result<(), Error> { +pub(crate) fn write_system(writer: &mut impl Write, platform: &str) -> Result<(), Error> { write_field(writer, platform, true)?; Ok(()) } -pub fn write_builder(writer: &mut impl Write, builder: &str) -> Result<(), Error> { +pub(crate) fn write_builder(writer: &mut impl Write, builder: &str) -> Result<(), Error> { write_field(writer, builder, true)?; Ok(()) } -pub fn write_arguments(writer: &mut impl Write, arguments: &[String]) -> Result<(), io::Error> { +pub(crate) fn write_arguments( + writer: &mut impl Write, + arguments: &[String], +) -> Result<(), io::Error> { write_char(writer, BRACKET_OPEN)?; write_array_elements( writer, @@ -170,7 +173,10 @@ pub fn write_arguments(writer: &mut impl Write, arguments: &[String]) -> Result< Ok(()) } -pub fn write_environment<E, K, V>(writer: &mut impl Write, environment: E) -> Result<(), io::Error> +pub(crate) fn write_environment<E, K, V>( + writer: &mut impl Write, + environment: E, +) -> Result<(), io::Error> where E: IntoIterator<Item = (K, V)>, K: AsRef<[u8]>, |