diff --git a/README.md b/README.md new file mode 100644 index 0000000..04c2663 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# What is this ? + +Contient un bon exemple réutilisable d'implémentation d'un fichier de conf en yaml à l'aide de Serde. + +Il y'a juste à adapter le struct AppConf aux besoins et sa fonction default(). diff --git a/src/main.rs b/src/main.rs index ac7ec45..1292d6e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -48,15 +48,10 @@ impl AppConf { } - - - - - - fn main() { let myconf = AppConf::default(); myconf.to_file(&Path::new("./settings.yml")); + //myconf == Ok(AppConf) let myconf = AppConf::from_file(Path::new("./settings.yml"));//.unwrap() dbg!(myconf); }