Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move glob matching into its own file (#5945)
### Problem See #5871, where we describe an encapsulation leak created by implementing all of the glob expansion logic in the body of `VFS`. ### Solution - Create `glob_matching.rs`, exporting the `GlobMatching` trait, which exports the two methods `canonicalize` and `expand`, which call into methods in a private trait `GlobMatchingImplementation`. **Note:** `canonicalize` calls `expand`, and vice versa, which is why both methods were moved to `glob_matching.rs`. ### Result Orthogonal glob matching logic is made into a trait that is implemented for all types implementing `VFS`, removing the encapsulation leak. The `VFS` trait is now just four method signature declarations, making the trait much easier to read and understand.
- Loading branch information