trivial changes to fix clippy::write_with_newline warnings
[rust-lightning] / lightning / src / util / macro_logger.rs
index c2c5122d06c47e040db0c6da264d24c6616b8bb6..e667c4d726c5f2075907d9c9f4c2ea465fb8e137 100644 (file)
@@ -80,9 +80,9 @@ pub(crate) struct DebugRoute<'a>(pub &'a Route);
 impl<'a> std::fmt::Display for DebugRoute<'a> {
        fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {
                for (idx, p) in self.0.paths.iter().enumerate() {
-                       write!(f, "path {}:\n", idx)?;
+                       writeln!(f, "path {}:", idx)?;
                        for h in p.iter() {
-                               write!(f, " node_id: {}, short_channel_id: {}, fee_msat: {}, cltv_expiry_delta: {}\n", log_pubkey!(h.pubkey), h.short_channel_id, h.fee_msat, h.cltv_expiry_delta)?;
+                               writeln!(f, " node_id: {}, short_channel_id: {}, fee_msat: {}, cltv_expiry_delta: {}", log_pubkey!(h.pubkey), h.short_channel_id, h.fee_msat, h.cltv_expiry_delta)?;
                        }
                }
                Ok(())