Clippy changes
All checks were successful
Run Tests on Code / run-tests (push) Successful in 11s

This commit is contained in:
Neshura 2023-12-27 13:39:02 +01:00
parent 4adfc7efb2
commit 251771f3c3
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C

View file

@ -276,27 +276,19 @@ fn main() {
}
if let Some(cf_entry) = cf_entry {
match cf_zone.update(entry, r#type, &cf_entry.id, ipv6, ipv4) {
Ok(_) => {
if cf_zone.update(entry, r#type, &cf_entry.id, ipv6, ipv4).is_ok() {
let info_msg = format!("Updated {} DNS Record for entry '{}' in zone '{}'", r#type, entry.name, zone.name);
match connected_to_journal() {
true => warn!("[INFO] {info_msg}"),
false => println!("[INFO] {info_msg}"),
}
},
Err(_) => {},
};
}
else {
match cf_zone.create(entry, r#type, ipv6, ipv4) {
Ok(_) => {
}
else if cf_zone.create(entry, r#type, ipv6, ipv4).is_ok() {
let info_msg = format!("Created {} DNS Record for entry '{}' in zone '{}'", r#type, entry.name, zone.name);
match connected_to_journal() {
true => info!("[INFO] {info_msg}"),
false => println!("[INFO] {info_msg}"),
}
},
Err(_) => {},
};
}
}