Skip to content

Commit 04dbf1f

Browse files
authored
Merge pull request #740 from rloomba/rloomba/trivial-clippy-fixes
trivial clippy warning fixes
2 parents 52121ea + c8e49aa commit 04dbf1f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lightning/src/routing/network_graph.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -518,13 +518,13 @@ impl Readable for NetworkGraph {
518518

519519
impl fmt::Display for NetworkGraph {
520520
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
521-
write!(f, "Network map\n[Channels]\n")?;
521+
writeln!(f, "Network map\n[Channels]")?;
522522
for (key, val) in self.channels.iter() {
523-
write!(f, " {}: {}\n", key, val)?;
523+
writeln!(f, " {}: {}", key, val)?;
524524
}
525-
write!(f, "[Nodes]\n")?;
525+
writeln!(f, "[Nodes]")?;
526526
for (key, val) in self.nodes.iter() {
527-
write!(f, " {}: {}\n", log_pubkey!(key), val)?;
527+
writeln!(f, " {}: {}", log_pubkey!(key), val)?;
528528
}
529529
Ok(())
530530
}

lightning/src/util/macro_logger.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ pub(crate) struct DebugRoute<'a>(pub &'a Route);
8080
impl<'a> std::fmt::Display for DebugRoute<'a> {
8181
fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {
8282
for (idx, p) in self.0.paths.iter().enumerate() {
83-
write!(f, "path {}:\n", idx)?;
83+
writeln!(f, "path {}:", idx)?;
8484
for h in p.iter() {
85-
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)?;
85+
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)?;
8686
}
8787
}
8888
Ok(())

0 commit comments

Comments
 (0)