Prompt to save files on recent project selection (#8673)

This commit is contained in:
Kirill Bulatov 2024-03-01 18:48:06 +02:00 committed by GitHub
parent 91d1146d97
commit cdf702aeff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 184 additions and 6 deletions

View file

@ -22,6 +22,16 @@ impl WorkspaceLocation {
pub fn paths(&self) -> Arc<Vec<PathBuf>> {
self.0.clone()
}
#[cfg(any(test, feature = "test-support"))]
pub fn new<P: AsRef<Path>>(paths: Vec<P>) -> Self {
Self(Arc::new(
paths
.into_iter()
.map(|p| p.as_ref().to_path_buf())
.collect(),
))
}
}
impl<P: AsRef<Path>, T: IntoIterator<Item = P>> From<T> for WorkspaceLocation {