Skip to content

feat: implement additional traits for nfs types#106

Merged
Vaiz merged 3 commits into
mainfrom
nfs3_types
Jul 26, 2025
Merged

feat: implement additional traits for nfs types#106
Vaiz merged 3 commits into
mainfrom
nfs3_types

Conversation

@Vaiz

@Vaiz Vaiz commented Jul 26, 2025

Copy link
Copy Markdown
Owner

No description provided.

@Vaiz Vaiz requested a review from Copilot July 26, 2025 08:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements additional traits for NFS3 types to improve ergonomics and reduce unnecessary cloning. The changes focus on adding Copy, Default, and Clone traits to various NFS3 types and updating code to utilize these new capabilities.

Key changes include:

  • Adding Copy and Default traits to core NFS3 types like enums and small structs
  • Implementing #[default] attributes on enum variants to specify default values
  • Updating code to use direct assignment instead of cloning for Copy types

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
crates/nfs3_types/src/nfs3.rs Adds Copy, Default, and Clone traits to NFS3 types with default enum variants
crates/nfs3_server/src/nfs_handlers.rs Removes unnecessary clone operation for Copy type
crates/nfs3_server/src/memfs/mod.rs Updates function signatures to use references and removes unnecessary clones
Comments suppressed due to low confidence (1)

crates/nfs3_types/src/nfs3.rs:987

  • The enum name NFS_PROGRAM should follow Rust naming conventions and be PascalCase, e.g., NfsProgram instead of NFS_PROGRAM.
pub enum NFS_PROGRAM {

Comment thread crates/nfs3_types/src/nfs3.rs
Comment thread crates/nfs3_server/src/memfs/mod.rs
@Vaiz Vaiz merged commit 4a21435 into main Jul 26, 2025
13 checks passed
@Vaiz Vaiz deleted the nfs3_types branch July 26, 2025 08:30
@github-actions github-actions Bot mentioned this pull request Jul 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants