Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/vfs/src/file_set.rs')
-rw-r--r--crates/vfs/src/file_set.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/crates/vfs/src/file_set.rs b/crates/vfs/src/file_set.rs
index 794f15577e..7eeb10d544 100644
--- a/crates/vfs/src/file_set.rs
+++ b/crates/vfs/src/file_set.rs
@@ -125,13 +125,7 @@ impl FileSetConfig {
/// Get the lexicographically ordered vector of the underlying map.
pub fn roots(&self) -> Vec<(Vec<u8>, u64)> {
- let mut stream = self.map.stream();
- let mut vc = vec![];
- while let Some((pth, idx)) = stream.next() {
- vc.push((pth.to_vec(), idx));
- }
-
- vc
+ self.map.stream().into_byte_vec()
}
/// Returns the set index for the given `path`.