mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-21 14:54:49 +01:00
Merge pull request #34 from hexedtech/fix/sorted-tree
feat: sort filetree before returning it
This commit is contained in:
commit
5e2e711b55
1 changed files with 4 additions and 2 deletions
|
@ -286,7 +286,7 @@ impl Workspace {
|
|||
/// A filter may be applied, and it may be strict (equality check) or not (starts_with check).
|
||||
// #[cfg_attr(feature = "js", napi)] // https://github.com/napi-rs/napi-rs/issues/1120
|
||||
pub fn filetree(&self, filter: Option<&str>, strict: bool) -> Vec<String> {
|
||||
self.0
|
||||
let mut tree = self.0
|
||||
.filetree
|
||||
.iter()
|
||||
.filter(|f| {
|
||||
|
@ -299,7 +299,9 @@ impl Workspace {
|
|||
})
|
||||
})
|
||||
.map(|f| f.clone())
|
||||
.collect()
|
||||
.collect::<Vec<String>>();
|
||||
tree.sort();
|
||||
tree
|
||||
}
|
||||
|
||||
pub(crate) fn run_actor(
|
||||
|
|
Loading…
Reference in a new issue