Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes the dependency on the external xdr-codec crate by replacing all usages of the PackedSize trait with the new packed_size method in the Pack trait and eliminating references to the dependency across the repository.
- Replaces calls to count_packed_size() with packed_size() throughout types and tests.
- Updates trait bounds and implementations for Pack and Unpack in all affected modules.
- Removes the xdr-codec dependency from Cargo.toml and adjusts related macros accordingly.
Reviewed Changes
Copilot reviewed 33 out of 34 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| crates/nfs3_types/tests/codec.rs | Updates assertions to call packed_size() instead of count_packed_size(). |
| crates/nfs3_types/src/xdr_codec/*.rs | Eliminates PackedSize implementations and updates Pack/Unpack usage. |
| crates/nfs3_types/src/nfs3.rs | Refactors Nfs3Result and Nfs3Option to use only Pack and Unpack bounds. |
| Cargo.toml | Removes the xdr-codec dependency and associated workspace settings. |
| (Other files) | Similar updates to tests, client, server, and macros for consistency. |
Comments suppressed due to low confidence (3)
crates/nfs3_types/src/nfs3.rs:120
- The updated bounds for Nfs3Option now require T to implement both Pack and Unpack. Verify that this change is backwards compatible with existing usage and clearly reflects the intended API design.
pub enum Nfs3Option<T: Pack + Unpack> {
crates/nfs3_types/Cargo.toml:21
- The xdr-codec dependency has been removed as intended; update the project documentation to reflect that the internal Pack and Unpack implementations are now solely used.
workspace = true
crates/nfs3_types/src/nfs3.rs:59
- Ensure that the migration from using PackedSize to exclusively using packed_size() is consistently applied. Double-check that all type constraints now correctly require only the Pack and Unpack traits.
{
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.