about summary refs log tree commit diff
path: root/tvix
diff options
context:
space:
mode:
authorAaqa Ishtyaq <aaqaishtyaq@gmail.com>2023-02-02T14·37+0530
committertazjin <tazjin@tvl.su>2023-02-13T19·45+0000
commitfc61dff037898cc11b5aeae6708c7a02dd4c3376 (patch)
tree0976f3eeb68b4a4dedc3425100062f34b23cfa10 /tvix
parent105069302b57c8fe7cfa99a034f3ad96195a5469 (diff)
chore(tvix/eval): use writeln for newline string r/5850
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 <aaqaishtyaq@gmail.com>
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8030
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix')
-rw-r--r--tvix/eval/src/builtins/to_xml.rs4
1 files changed, 2 insertions, 2 deletions
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<W: Write>(mut writer: W, value: &Value) -> Result<(),
 
     // Write a literal document declaration, using C++-Nix-style
     // single quotes.
-    write!(writer, "<?xml version='1.0' encoding='utf-8'?>\n")?;
+    writeln!(writer, "<?xml version='1.0' encoding='utf-8'?>")?;
 
     let mut writer = EventWriter::new_with_config(writer, config);
 
@@ -33,7 +33,7 @@ pub(super) fn value_to_xml<W: Write>(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(())
 }