155 improve nxs to sort file and better display of content#158
Merged
LuernOutOfOrder merged 2 commits intodevelopfrom Jul 6, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR bumps the project version, enables sorting for NXS project entries, and adds documentation for the update function.
- Version updated from 2.10.2 to 2.11.0
- Derived
Ord,Eq,PartialEq, andPartialOrdforProjectListandProjectEntry - Documented
update_nxs_fileand sorted entries after insertion
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/nxfs/nxs.rs | Added ordering traits, a doc comment for update_nxs_file, and sorting logic |
| src/main.rs | Updated VERSION constant to 2.11.0 |
| Cargo.toml | Bumped package version to 2.11.0 |
Comments suppressed due to low confidence (2)
src/nxfs/nxs.rs:238
- Expand this doc comment to describe the function's parameter (
nxp_ref) and outline any side effects or behaviors, such as sorting the entries.
/// Update the NXS file by adding a new project to it.
src/nxfs/nxs.rs:259
- [nitpick] Consider adding a unit test for
update_nxs_fileto verify that new entries are correctly inserted and sorted.
nxs_entries.entries.sort();
| /// the project in bytes. It is of type `u32`, which means it can hold unsigned integer values ranging | ||
| /// from 0 to 2^32 - 1. This property indicates the amount of storage space the | ||
| #[derive(Debug, Clone, Serialize, Deserialize)] | ||
| #[derive(Debug, Clone, Serialize, Deserialize, Ord, Eq,PartialEq, PartialOrd)] |
There was a problem hiding this comment.
Insert a space after the comma between Eq, and PartialEq to improve readability of the derive attribute.
Suggested change
| #[derive(Debug, Clone, Serialize, Deserialize, Ord, Eq,PartialEq, PartialOrd)] | |
| #[derive(Debug, Clone, Serialize, Deserialize, Ord, Eq, PartialEq, PartialOrd)] |
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.
This pull request introduces several changes to enhance functionality and maintain consistency in the
nyxproject. Key updates include a version bump, improved sorting capabilities for project entries, and added documentation for updating NXS files.Version Update:
Cargo.toml: Updated the package version from2.10.2to2.11.0.src/main.rs: Updated theVERSIONconstant to reflect the new version2.11.0.Sorting and Equality Enhancements:
src/nxfs/nxs.rs: AddedOrd,Eq,PartialEq, andPartialOrdtraits toProjectListandProjectEntrystructs to enable sorting and equality comparisons. [1] [2]Functionality Improvements:
src/nxfs/nxs.rs: Added documentation for theupdate_nxs_filefunction, explaining its purpose of updating the NXS file by adding a new project.src/nxfs/nxs.rs: Enhanced theupdate_nxs_filefunction to sort project entries in ascending order after adding a new entry.