Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR standardizes the representation of optional attributes in the NFS3 server implementation by replacing the NFS3-specific post_op_attr wrapper type with Rust's native Option<fattr3> type. This change simplifies the API and makes it more idiomatic Rust code.
Key changes:
- Replaced
post_op_attrenum withOption<fattr3>for optional file attributes - Updated field name from
handletoname_handleinDirEntryPlusstruct for clarity - Removed unused imports of
post_op_attrandNfs3Optiontypes
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| crates/nfs3_server/src/vfs/mod.rs | Updated imports to include post_op_attr and removed fattr3 |
| crates/nfs3_server/src/vfs/iterator.rs | Changed DirEntryPlus to use Option<fattr3> and renamed handle field to name_handle |
| crates/nfs3_server/src/vfs/adapters/mod.rs | Updated pattern matching from Nfs3Option::Some to Some for optional attributes |
| crates/nfs3_server/src/vfs/adapters/iterator.rs | Updated test cases to use new field names and optional attribute format |
| crates/nfs3_server/src/memfs/mod.rs | Updated memfs iterator to use new optional attribute format |
| crates/nfs3_server/examples/mirrorfs.rs | Updated mirrorfs example to use new optional attribute format |
| crates/cargo_nfs3_server/src/mirror.rs | Updated cargo mirror implementation to use new optional attribute format |
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.
No description provided.