remove main

This commit is contained in:
Love 2024-07-25 20:35:08 +02:00
parent b6f447e39f
commit 5466090256

View File

@ -1,6 +1,6 @@
use crate::Config;
use std::time::Duration; use std::time::Duration;
use toml; use toml;
use crate::Config;
const TOML_STR_ONE: &str = r#" const TOML_STR_ONE: &str = r#"
zone_id = "" zone_id = ""
@ -57,19 +57,3 @@ domains = [""]
let toml_str = toml::to_string(&config).unwrap(); let toml_str = toml::to_string(&config).unwrap();
assert_eq!(toml_to_be.trim(), toml_str.trim()); assert_eq!(toml_to_be.trim(), toml_str.trim());
} }
fn main() {
let toml_str = r#"
zone_id = ""
api_key = ""
domains = [""]
max_errors_in_row = 5
max_duration = "1d 2h 30m 45s 500000000ns"
"#;
let config: Config = toml::from_str(toml_str).unwrap();
println!("{:?}", config);
let toml_out = toml::to_string(&config).unwrap();
println!("{}", toml_out);
}