From fc61dff037898cc11b5aeae6708c7a02dd4c3376 Mon Sep 17 00:00:00 2001 From: Aaqa Ishtyaq Date: Thu, 2 Feb 2023 20:07:25 +0530 Subject: chore(tvix/eval): use writeln for newline string This CL address clippy warning which expects to use `writeln` instead of `write` for strings with new line. Change-Id: Ia72a07502c60cfd489ecf1e3833b9d42d44a8b17 Signed-off-by: Aaqa Ishtyaq Reviewed-on: https://cl.tvl.fyi/c/depot/+/8030 Tested-by: BuildkiteCI Reviewed-by: tazjin --- tvix/eval/src/builtins/to_xml.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tvix/eval/src') diff --git a/tvix/eval/src/builtins/to_xml.rs b/tvix/eval/src/builtins/to_xml.rs index 5382beb60851..4176c8146e34 100644 --- a/tvix/eval/src/builtins/to_xml.rs +++ b/tvix/eval/src/builtins/to_xml.rs @@ -24,7 +24,7 @@ pub(super) fn value_to_xml(mut writer: W, value: &Value) -> Result<(), // Write a literal document declaration, using C++-Nix-style // single quotes. - write!(writer, "\n")?; + writeln!(writer, "")?; let mut writer = EventWriter::new_with_config(writer, config); @@ -33,7 +33,7 @@ pub(super) fn value_to_xml(mut writer: W, value: &Value) -> Result<(), writer.write(XmlEvent::end_element())?; // Unwrap the writer to add the final newline that C++ Nix adds. - write!(writer.into_inner(), "\n")?; + writeln!(writer.into_inner())?; Ok(()) } -- cgit 1.4.1