fix: Remove whitespace from current IP

This commit is contained in:
Rostislav Raykov 2019-09-17 18:28:26 +02:00
parent 8e938e3299
commit 6f5890a81b

View file

@ -63,7 +63,9 @@ pub fn get_current_ip() -> Result<String, Error> {
Ok(reqwest::Client::new()
.get("http://ipv4.icanhazip.com")
.send()?
.text()?)
.text()?
.trim()
.into())
}
pub fn update_ddns(ip: &str, domain: &str, zone_id: &str, record_id: &str, email: &str, key: &str) -> Result<(), Error> {