diff options
| author | Fuwn <[email protected]> | 2022-03-30 03:48:13 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-03-30 03:48:13 -0700 |
| commit | 76b5d1c2ad1f35cd20695f847504312f3d2bbd74 (patch) | |
| tree | 77e338405a6c492dc412e90ad1761089c7daf193 | |
| parent | refactor(main): move database location (diff) | |
| download | locus-76b5d1c2ad1f35cd20695f847504312f3d2bbd74.tar.xz locus-76b5d1c2ad1f35cd20695f847504312f3d2bbd74.zip | |
format(main): rustfmt
| -rw-r--r-- | src/main.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index db3dfb4..2bfd8b0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -48,10 +48,16 @@ use yarte::Template; static DATABASE: SyncLazy<Mutex<PickleDb>> = SyncLazy::new(|| { Mutex::new({ if std::fs::File::open(".locus/locus.db").is_ok() { - PickleDb::load_json(".locus/locus.db", pickledb::PickleDbDumpPolicy::AutoDump) - .unwrap() + PickleDb::load_json( + ".locus/locus.db", + pickledb::PickleDbDumpPolicy::AutoDump, + ) + .unwrap() } else { - PickleDb::new_json(".locus/locus.db", pickledb::PickleDbDumpPolicy::AutoDump) + PickleDb::new_json( + ".locus/locus.db", + pickledb::PickleDbDumpPolicy::AutoDump, + ) } }) }); |