Clippy linting changes

This commit is contained in:
Neshura 2023-12-26 04:18:58 +01:00
parent 31892b27fc
commit bd7514ea84
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C
3 changed files with 28 additions and 29 deletions

View file

@ -1,6 +1,5 @@
/*use cloudflare_old::{Instance, CloudflareDnsType};*/
use reqwest::blocking::get;
use serde_derive::{Deserialize, Serialize};
use std::{thread::{sleep}};
use std::error::Error;
use std::net::{Ipv4Addr, Ipv6Addr};
@ -25,8 +24,8 @@ struct Addresses {
impl Addresses {
fn new() -> Result<Self, Box<dyn Error>> {
let mut ret = Self {
ipv4_uri: "https://am.i.mullvad.net/ip".to_string(),
ipv6_uri: "https://ipv6.am.i.mullvad.net/ip".to_string(),
ipv4_uri: "https://am.i.mullvad.net/ip".to_owned(),
ipv6_uri: "https://ipv6.am.i.mullvad.net/ip".to_owned(),
ipv4: Ipv4Addr::new(0, 0, 0, 0),
ipv6: Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0)
};
@ -200,7 +199,7 @@ fn main() {
if true {
let mut error = false;
for zone in &zone_cfgs {
let cf_zone = match CloudflareZone::new(&zone) {
let cf_zone = match CloudflareZone::new(zone) {
Ok(data) => data,
Err(e) => {
let err_msg = format!("Cloudflare Token likely not set. Error: {}", e);