Skip to content

Commit

Permalink
tweak output for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
davepacheco committed Mar 27, 2024
1 parent c2bfc13 commit 93d52b5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
10 changes: 5 additions & 5 deletions clients/dns-service-client/src/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ impl<'a> std::fmt::Display for DnsDiff<'a> {
if !names_changed {
writeln!(f, " DNS zone: {:?} (unchanged)", zone_name,)?;
} else {
writeln!(f, "~ DNS zone: {:?}: ", zone_name)?;
writeln!(f, "* DNS zone: {:?}: ", zone_name)?;
}

let print_records = |f: &mut std::fmt::Formatter<'_>,
Expand All @@ -148,7 +148,7 @@ impl<'a> std::fmt::Display for DnsDiff<'a> {
for r in records.iter() {
writeln!(
f,
" {} {}",
"{} {}",
prefix,
match r {
DnsRecord::A(addr) => format!("A {}", addr),
Expand All @@ -168,7 +168,7 @@ impl<'a> std::fmt::Display for DnsDiff<'a> {
NameDiff::Added(name, records) => {
writeln!(
f,
" + name: {:50} (records: {})",
"+ name: {:50} (records: {})",
name,
records.len()
)?;
Expand All @@ -177,7 +177,7 @@ impl<'a> std::fmt::Display for DnsDiff<'a> {
NameDiff::Removed(name, records) => {
writeln!(
f,
" - name: {:50} (records: {})",
"- name: {:50} (records: {})",
name,
records.len()
)?;
Expand All @@ -195,7 +195,7 @@ impl<'a> std::fmt::Display for DnsDiff<'a> {
NameDiff::Changed(name, records1, records2) => {
writeln!(
f,
" ~ name: {:50} (records: {} -> {})",
"* name: {:50} (records: {} -> {})",
name,
records1.len(),
records2.len(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
~ DNS zone: "dummy":
- name: ex1 (records: 1)
- A 127.0.0.1
~ name: ex2 (records: 1 -> 1)
- A 192.168.1.3
+ A 192.168.1.4
+ name: ex3 (records: 1)
+ A 127.0.0.1
* DNS zone: "dummy":
- name: ex1 (records: 1)
- A 127.0.0.1
* name: ex2 (records: 1 -> 1)
- A 192.168.1.3
+ A 192.168.1.4
+ name: ex3 (records: 1)
+ A 127.0.0.1
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
~ DNS zone: "dummy":
+ name: ex1 (records: 1)
+ A 127.0.0.1
~ name: ex2 (records: 1 -> 1)
- A 192.168.1.4
+ A 192.168.1.3
- name: ex3 (records: 1)
- A 127.0.0.1
* DNS zone: "dummy":
+ name: ex1 (records: 1)
+ A 127.0.0.1
* name: ex2 (records: 1 -> 1)
- A 192.168.1.4
+ A 192.168.1.3
- name: ex3 (records: 1)
- A 127.0.0.1

0 comments on commit 93d52b5

Please sign in to comment.