feat(tvix/eval): expose value_to_xml for test cases

It's debateable on whether the serialization code should be exposed a
bit more prominently or not.

Change-Id: Iff7a28f884b1490b12b145dfdadbedacb84fd387
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10684
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
Florian Klink 2024-01-23 14:30:48 +02:00 committed by flokli
parent 8e517bc8d0
commit adff7be4d1
2 changed files with 4 additions and 1 deletions

View file

@ -27,6 +27,9 @@ use self::versions::{VersionPart, VersionPartsIter};
mod to_xml;
mod versions;
#[cfg(test)]
pub use to_xml::value_to_xml;
#[cfg(feature = "impure")]
mod impure;

View file

@ -11,7 +11,7 @@ use crate::{ErrorKind, Value};
/// Recursively serialise a value to XML. The value *must* have been
/// deep-forced before being passed to this function.
pub(super) fn value_to_xml<W: Write>(mut writer: W, value: &Value) -> Result<(), ErrorKind> {
pub fn value_to_xml<W: Write>(mut writer: W, value: &Value) -> Result<(), ErrorKind> {
let config = EmitterConfig {
perform_indent: true,
pad_self_closing: true,