Do not display api_key in the log.
[gandi_dns_update.git] / src / main.rs
index 3c3b4f5..2a9b5e4 100644 (file)
@@ -32,7 +32,7 @@ impl std::fmt::Display for Error {
 
 impl std::error::Error for Error { }
 
-#[derive(Debug, Deserialize, Serialize)]
+#[derive(Debug, Clone, Deserialize, Serialize)]
 struct Config {
     delay_between_check: time::Duration,
     api_key: String,
@@ -68,7 +68,7 @@ fn main() -> Result<()> {
 
     let config = Config::read(FILE_CONF)?;
 
-    println!("Configuration: {:?}", config);
+    println!("Configuration: {:?}", Config { api_key: String::from("*****"), ..config.clone() });
 
     loop {
         let time_beginning_loop = time::Instant::now();