refactor(fs): split FileSystem into core + FileSystemExt#765
Closed
refactor(fs): split FileSystem into core + FileSystemExt#765
Conversation
Extract optional methods (usage, mkfifo, limits) from FileSystem into a
new FileSystemExt supertrait. This reduces the implementation burden for
custom filesystem backends — they only need an empty `impl FileSystemExt
for T {}` to accept sensible defaults.
FileSystem: 13 required POSIX methods (core contract)
FileSystemExt: 3 optional methods with defaults (resource tracking, FIFOs)
Closes #742
Contributor
Author
|
Superseded by new PR from rebased branch with doc fix. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
usage(),mkfifo(), andlimits()fromFileSysteminto a newFileSystemExtsupertrait with sensible defaultsFileSystemnow contains only the 13 core POSIX-like methods;FileSystemExtholds 3 optional extension methodsimpl FileSystemExt for T {}to accept defaults, reducing implementation burdenTest plan
cargo check --all-targets --all-featurespassescargo clippy --all-targets --all-features -- -D warningscleancargo fmt --checkcleancargo test --all-features— all 95 doctests pass, all integration tests passCloses #742