first commit

This commit is contained in:
Justine 2024-08-09 20:59:11 +02:00
parent 2c766354f6
commit 582aefa54a
2 changed files with 6 additions and 6 deletions

5
README.md Normal file
View File

@ -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().

View File

@ -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);
}