summaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs
index 1542f9e..fe93da6 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -1,5 +1,4 @@
use std::{
- cell::RefCell,
env,
fs::{create_dir_all, read_to_string, File, OpenOptions},
io::Write,
@@ -8,6 +7,8 @@ use std::{
sync::Arc,
};
+use parking_lot::Mutex;
+
use anyhow::{anyhow, Context, Result};
use inquire::{Confirm, Text};
use serde::{Deserialize, Serialize};
@@ -56,7 +57,7 @@ pub struct Config {
pub role: Option<Role>,
}
-pub type SharedConfig = Arc<RefCell<Config>>;
+pub type SharedConfig = Arc<Mutex<Config>>;
impl Config {
pub fn init(is_interactive: bool) -> Result<Config> {