diff --git a/Cargo.lock b/Cargo.lock index a69238c..0320a45 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -89,7 +89,7 @@ dependencies = [ [[package]] name = "ddns_cloudflare" -version = "0.2.0" +version = "0.3.0" dependencies = [ "clap", "directories", diff --git a/Cargo.toml b/Cargo.toml index ce06993..615a297 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ddns_cloudflare" -version = "0.2.0" +version = "0.3.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/ip.rs b/src/ip.rs index 4c4ef2a..e77fbb6 100644 --- a/src/ip.rs +++ b/src/ip.rs @@ -58,7 +58,7 @@ pub(crate) async fn determine_ipv6(config: &Config) -> Option { .filter(|&ip| ip != response.ip) .collect::>(); - ip = ips.first()?.to_owned(); + ip = ips.first().unwrap_or(&ip).to_owned(); } match ip {