Skip to content

155 improve nxs to sort file and better display of content#158

Merged
LuernOutOfOrder merged 2 commits intodevelopfrom
155-improve-nxs-to-sort-file-and-better-display-of-content
Jul 6, 2025
Merged

155 improve nxs to sort file and better display of content#158
LuernOutOfOrder merged 2 commits intodevelopfrom
155-improve-nxs-to-sort-file-and-better-display-of-content

Conversation

@LuernOutOfOrder
Copy link
Owner

This pull request introduces several changes to enhance functionality and maintain consistency in the nyx project. 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 from 2.10.2 to 2.11.0.
  • src/main.rs: Updated the VERSION constant to reflect the new version 2.11.0.

Sorting and Equality Enhancements:

  • src/nxfs/nxs.rs: Added Ord, Eq, PartialEq, and PartialOrd traits to ProjectList and ProjectEntry structs to enable sorting and equality comparisons. [1] [2]

Functionality Improvements:

  • src/nxfs/nxs.rs: Added documentation for the update_nxs_file function, explaining its purpose of updating the NXS file by adding a new project.
  • src/nxfs/nxs.rs: Enhanced the update_nxs_file function to sort project entries in ascending order after adding a new entry.

@LuernOutOfOrder LuernOutOfOrder added this to the v3.0.0 milestone Jul 6, 2025
@LuernOutOfOrder LuernOutOfOrder self-assigned this Jul 6, 2025
@LuernOutOfOrder LuernOutOfOrder added the enhancement New feature or request label Jul 6, 2025
@LuernOutOfOrder LuernOutOfOrder requested a review from Copilot July 6, 2025 16:43
Copy link

Copilot AI left a comment

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 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, and PartialOrd for ProjectList and ProjectEntry
  • Documented update_nxs_file and 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_file to 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)]
Copy link

Copilot AI Jul 6, 2025

Choose a reason for hiding this comment

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

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)]

Copilot uses AI. Check for mistakes.
@LuernOutOfOrder LuernOutOfOrder merged commit 8e003b2 into develop Jul 6, 2025
1 check passed
@LuernOutOfOrder LuernOutOfOrder deleted the 155-improve-nxs-to-sort-file-and-better-display-of-content branch July 6, 2025 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants