SQLite-backed Key / Value Store
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor: removed unused function

+5 -13
+4
src/main.rs
··· 36 36 let mut cfg = safir.get_config(); 37 37 cfg.mode = mode; 38 38 cfg.write().context("writing config out")?; 39 + println!( 40 + "Set store mode to: '{:?}'\nActive on the next run of Safir!", 41 + cfg.mode 42 + ); 39 43 } 40 44 } 41 45
+1 -13
src/utils.rs
··· 5 5 path::{Path, PathBuf}, 6 6 }; 7 7 8 - /// Debug flag for testing without affecting my existing store 9 - const DEBUG: bool = true; 10 - 11 8 /// Type to represent a KVPair 12 9 pub type KVPair = (String, String); 13 10 ··· 70 67 71 68 /// Create the .safirstore directory in the user HOME 72 69 pub fn load_safir_workspace() -> PathBuf { 73 - let store_dir = if DEBUG { 74 - ".debug_safirstore" 75 - } else { 76 - ".safirstore" 77 - }; 78 - 79 70 match dirs::home_dir() { 80 71 Some(home) => { 81 - let working_dir = home.join(store_dir); 82 - if DEBUG && !working_dir.exists() { 83 - println!("DEBUG: Creating safir store at debug location"); 84 - } 72 + let working_dir = home.join(".safirstore"); 85 73 fs::create_dir_all(&working_dir).expect("unable to create main directory"); 86 74 87 75 working_dir