huskies: merge 858
This commit is contained in:
@@ -84,6 +84,7 @@ pub async fn open_project(
|
||||
Ok(path)
|
||||
}
|
||||
|
||||
/// Close the active project by clearing the in-memory root and stored path.
|
||||
#[allow(dead_code)]
|
||||
pub fn close_project(state: &SessionState, store: &dyn StoreOps) -> Result<(), String> {
|
||||
{
|
||||
@@ -99,6 +100,7 @@ pub fn close_project(state: &SessionState, store: &dyn StoreOps) -> Result<(), S
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Return the active project path, restoring it from the store if needed.
|
||||
#[allow(dead_code)]
|
||||
pub fn get_current_project(
|
||||
state: &SessionState,
|
||||
@@ -133,6 +135,7 @@ pub fn get_current_project(
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
/// List all previously-opened project paths from the store.
|
||||
#[allow(dead_code)]
|
||||
pub fn get_known_projects(store: &dyn StoreOps) -> Result<Vec<String>, String> {
|
||||
let projects = store
|
||||
@@ -146,6 +149,7 @@ pub fn get_known_projects(store: &dyn StoreOps) -> Result<Vec<String>, String> {
|
||||
Ok(projects)
|
||||
}
|
||||
|
||||
/// Remove a project path from the known-projects list in the store.
|
||||
#[allow(dead_code)]
|
||||
pub fn forget_known_project(path: String, store: &dyn StoreOps) -> Result<(), String> {
|
||||
let mut known_projects = get_known_projects(store)?;
|
||||
|
||||
Reference in New Issue
Block a user