Skip to content

Commit

Permalink
fix formatting for older rust versions
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Theil <[email protected]>
  • Loading branch information
thillux committed Oct 14, 2023
1 parent 815a951 commit df85aef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions openssl/src/x509/extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,9 @@ impl SbgpAsIdentifier {
append(&mut value, &mut first, self.critical, "critical");
for (asn_min, asn_max) in &self.asn {
let asn_format = if asn_min == asn_max {
format!("AS:{asn_min}")
format!("AS:{}", asn_min)
} else {
format!("AS:{asn_min}-{asn_max}")
format!("AS:{}-{}", asn_min, asn_max)
};
append(&mut value, &mut first, true, &asn_format);
}
Expand Down Expand Up @@ -557,9 +557,9 @@ impl SbgpIpAddressIdentifier {
for (ip_addr_min, ip_addr_max) in &self.ip_ranges {
let version = if ip_addr_min.is_ipv4() { 4 } else { 6 };
let ip_addr_format = if ip_addr_min == ip_addr_max {
format!("IPv{version}:{ip_addr_min}")
format!("IPv{}:{}", version, ip_addr_min)
} else {
format!("IPv{version}:{ip_addr_min}-{ip_addr_max}")
format!("IPv{}:{}-{}", version, ip_addr_min, ip_addr_max)
};
append(&mut value, &mut first, true, &ip_addr_format);
}
Expand Down

0 comments on commit df85aef

Please sign in to comment.