summaryrefslogtreecommitdiffstats
path: root/src/stackexchange/local_storage.rs
diff options
context:
space:
mode:
authorSam Tay <sam.chong.tay@gmail.com>2020-07-09 22:24:49 -0700
committerSam Tay <sam.chong.tay@gmail.com>2020-07-10 19:13:49 -0700
commit46e019ddf3b67a8307773edd109aa29d5be1a8b3 (patch)
tree4e7267978a99d3fedc4809223c4b67ed7663b1ff /src/stackexchange/local_storage.rs
parent26f57de89cb9b903917f51af4ab5df9e287af1a4 (diff)
Add hidden --print-config-path for debugging
And refactor config to put functions under Config implementation; this seems more Rustic, based on my limited experience looking at other codebases.
Diffstat (limited to 'src/stackexchange/local_storage.rs')
-rw-r--r--src/stackexchange/local_storage.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stackexchange/local_storage.rs b/src/stackexchange/local_storage.rs
index 8d009f8..d5adeb2 100644
--- a/src/stackexchange/local_storage.rs
+++ b/src/stackexchange/local_storage.rs
@@ -2,7 +2,7 @@ use std::collections::HashMap;
use std::fs;
use std::path::PathBuf;
-use crate::config::project_dir;
+use crate::config::Config;
use crate::error::{Error, Result};
use crate::utils;
@@ -40,7 +40,7 @@ impl LocalStorage {
}
pub async fn new(update: bool) -> Result<Self> {
- let project = project_dir()?;
+ let project = Config::project_dir()?;
let dir = project.cache_dir();
fs::create_dir_all(&dir)?;
let sites_filename = dir.join("sites.json");