Skip to content

Commit

Permalink
Use BTreeMap for in mem fs
Browse files Browse the repository at this point in the history
  • Loading branch information
azdavis committed Sep 19, 2024
1 parent fa51829 commit 8d471f5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/paths/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! Types for working with paths.
use fast_hash::FxHashMap;
use std::collections::BTreeMap;
use std::path::{Component, Path, PathBuf};

/// A store of paths.
Expand Down Expand Up @@ -327,13 +328,13 @@ impl FileSystem for RealFileSystem {
#[derive(Debug, Default)]
pub struct MemoryFileSystem {
/// The in-memory storage.
pub inner: FxHashMap<CleanPathBuf, String>,
pub inner: BTreeMap<CleanPathBuf, String>,
}

impl MemoryFileSystem {
/// Returns a new `MemoryFileSystem`.
#[must_use]
pub fn new(inner: FxHashMap<CleanPathBuf, String>) -> Self {
pub fn new(inner: BTreeMap<CleanPathBuf, String>) -> Self {
Self { inner }
}

Expand Down

0 comments on commit 8d471f5

Please sign in to comment.