summary refs log tree commit diff stats
path: root/src/data.rs
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-06-18 16:32:47 +0200
committerSoispha <soispha@vhack.eu>2023-06-18 16:32:47 +0200
commit369bf07cbb36d8e72025014bfd4ddc52d9049fde (patch)
tree545b32762ec8af521484f6c520dc568edaf8a2f7 /src/data.rs
downloadlpm-369bf07cbb36d8e72025014bfd4ddc52d9049fde.tar.gz
lpm-369bf07cbb36d8e72025014bfd4ddc52d9049fde.zip
Chore: Initial commit
Diffstat (limited to '')
-rw-r--r--src/data.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/data.rs b/src/data.rs
new file mode 100644
index 0000000..4966e88
--- /dev/null
+++ b/src/data.rs
@@ -0,0 +1,28 @@
+use serde_derive::{Deserialize, Serialize};
+
+#[derive(Deserialize, Serialize)]
+pub struct Data {
+    pub last_chapter: LastChapter,
+}
+
+#[derive(Deserialize, Serialize)]
+pub struct LastChapter {
+    pub user_name: String,
+    pub number: u32,
+}
+
+
+//fn main() {
+//    let config: Config = toml::from_str(r#"
+//        ip = '127.0.0.1'
+//
+//        [keys]
+//        github = 'xxxxxxxxxxxxxxxxx'
+//        travis = 'yyyyyyyyyyyyyyyyy'
+//    "#).unwrap();
+//
+//    assert_eq!(config.ip, "127.0.0.1");
+//    assert_eq!(config.port, None);
+//    assert_eq!(config.keys.github, "xxxxxxxxxxxxxxxxx");
+//    assert_eq!(config.keys.travis.as_ref().unwrap(), "yyyyyyyyyyyyyyyyy");
+//}