Skip to content

Commit 55ed560

Browse files
committed
fix: Add trailing newlines to cluster info strings.
- Ensures `cluster nodes` output always ends with a newline. - Ensures `cluster info` output always ends with a newline, aligning with Redis's standard output for these commands.
1 parent 390e4e9 commit 55ed560

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cluster.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ impl ClusterManager {
459459
result.push(node_info);
460460
}
461461

462-
result.join("\n")
462+
format!("{}\n", result.join("\n"))
463463
}
464464

465465
/// Convert slots set to Redis slot ranges format
@@ -527,7 +527,7 @@ impl ClusterManager {
527527
cluster_current_epoch:1\n\
528528
cluster_my_epoch:1\n\
529529
cluster_stats_messages_sent:0\n\
530-
cluster_stats_messages_received:0",
530+
cluster_stats_messages_received:0\n",
531531
cluster_state, total_assigned_slots, total_assigned_slots, total_nodes, total_nodes
532532
)
533533
}

0 commit comments

Comments
 (0)