Fix cargo fmt formatting and diarize threading test mock
This commit is contained in:
@@ -15,12 +15,10 @@ pub struct AppState {
|
||||
impl AppState {
|
||||
pub fn new() -> Result<Self, String> {
|
||||
let data_dir = LlamaManager::data_dir();
|
||||
std::fs::create_dir_all(&data_dir)
|
||||
.map_err(|e| format!("Cannot create data dir: {e}"))?;
|
||||
std::fs::create_dir_all(&data_dir).map_err(|e| format!("Cannot create data dir: {e}"))?;
|
||||
|
||||
let db_path = data_dir.join("voice_to_notes.db");
|
||||
let conn = db::open_database(&db_path)
|
||||
.map_err(|e| format!("Cannot open database: {e}"))?;
|
||||
let conn = db::open_database(&db_path).map_err(|e| format!("Cannot open database: {e}"))?;
|
||||
|
||||
Ok(Self {
|
||||
db: Mutex::new(conn),
|
||||
|
||||
Reference in New Issue
Block a user