From dbc66f6360735e4586c4503597edaccc9f3d5887 Mon Sep 17 00:00:00 2001 From: Matthias Herzog <37505324+kegato@users.noreply.github.com> Date: Sat, 16 Mar 2019 13:35:24 +0100 Subject: [PATCH] upgrade to 2018 edition --- Cargo.toml | 1 + src/cli.rs | 6 +++--- src/inwx.rs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 08241e1..7342c0f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,6 +6,7 @@ authors = ["Matthias Herzog"] readme = "README.md" license = "MIT" repository = "https://github.com/kegato/letsencrypt-inwx" +edition = "2018" [package.metadata.deb] depends = "" diff --git a/src/cli.rs b/src/cli.rs index 796cc2c..1dc64f9 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -3,9 +3,9 @@ use std::io::BufReader; use std::thread::sleep; use std::time::{Duration, Instant}; use clap::{Arg, App, SubCommand}; -use config::Config; -use inwx::{Inwx, InwxError}; -use dns::{check_txt_record, lookup_real_domain}; +use crate::config::Config; +use crate::inwx::{Inwx, InwxError}; +use crate::dns::{check_txt_record, lookup_real_domain}; impl From for String { fn from(inwx_error: InwxError) -> String { diff --git a/src/inwx.rs b/src/inwx.rs index 747a645..346a7d7 100644 --- a/src/inwx.rs +++ b/src/inwx.rs @@ -106,7 +106,7 @@ impl<'a> Inwx<'a> { let domain_root = text.text(); if domain.ends_with(&format!(".{}", domain_root)) { - let mut name = &domain[0..domain.len() - domain_root.len() - 1]; + let name = &domain[0..domain.len() - domain_root.len() - 1]; return Ok((domain_root.to_owned(), name.to_owned())); } else if domain == domain_root {