diff options
author | Joris | 2022-02-26 22:23:34 +0100 |
---|---|---|
committer | Joris | 2022-02-26 22:23:34 +0100 |
commit | 01a1e5e4f45dc80cd430d18492817b733fab5603 (patch) | |
tree | fa39d7abaf04d9b805a19767c088f7d61eecb509 /src/main.rs | |
parent | 4ff3fa15967d989658804b94e1ce035dfd3e5a5c (diff) |
Fix linter warnings
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs index 3e3e741..bed2ce1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,15 +19,15 @@ struct Opt { fn main() -> Result<()> { let deck_path = Opt::from_args().deck; - let conn = db::db::init(db_path(&deck_path))?; - let deck_name = deck::pp_from_path(&deck_path).unwrap_or("Deck".to_string()); - let mut term = gui::gui::terminal()?; + let conn = db::init(db_path(&deck_path))?; + let deck_name = deck::pp_from_path(&deck_path).unwrap_or_else(|| "Deck".to_string()); + let mut term = gui::terminal()?; let events = Events::new(); - gui::gui::synchronize(&conn, &mut term, &events, &deck_path, &deck_name)?; - gui::gui::start(&conn, &mut term, &events, &deck_name) + gui::synchronize(&conn, &mut term, &events, &deck_path, &deck_name)?; + gui::start(&conn, &mut term, &events, &deck_name) } -fn db_path(deck_path: &String) -> String { +fn db_path(deck_path: &str) -> String { let mut path = PathBuf::from(deck_path); path.set_extension("db"); path.to_string_lossy().to_string() |