This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::collections::HashMap; | |
| fn main() { | |
| let action = std::env::args().nth(1).expect("Please provide an action"); | |
| let item = std::env::args().nth(2).expect("Please provide an item"); | |
| let mut todo = Todo::new().expect("Initialisation of db failed"); | |
| if action == "add" { | |
| todo.insert(item); |
OlderNewer