Skip to content

chore: Format.#1

Merged
tcrypt25519 merged 1 commit intomainfrom
ts/fmt
Feb 14, 2026
Merged

chore: Format.#1
tcrypt25519 merged 1 commit intomainfrom
ts/fmt

Conversation

@tcrypt25519
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings February 14, 2026 14:45
@semanticdiff-com
Copy link

semanticdiff-com bot commented Feb 14, 2026

Review changes with  SemanticDiff

Changed Files
File Status
  src/range.rs  100% smaller
  src/types.rs  100% smaller
  src/lib.rs  100% smaller

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @tcrypt25519, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing code readability and maintaining consistency by applying standard Rust formatting rules across several core files. The changes primarily involve adjusting line breaks and indentation within function definitions, enum declarations, and macro invocations, ensuring a cleaner and more uniform codebase without altering any logic or functionality.

Highlights

  • Code Formatting: Applied consistent code formatting across src/lib.rs, src/range.rs, and src/types.rs to enhance readability.
  • Readability Improvements: Improved the visual structure of function signatures, enum variants, and macro calls by introducing strategic line breaks and adjusting indentation.
Changelog
  • src/lib.rs
    • Adjusted line breaks for cfg_attr attribute.
    • Reformatted FuzzyDate enum variants (Day, Month) for improved readability.
    • Added line breaks to new_day function signature.
    • Reformatted FuzzyDate::from_columns match arms.
    • Added line breaks to split and map_err calls.
    • Reformatted upper_bound_inclusive and upper_bound_exclusive match arms.
    • Adjusted Ord implementation for FuzzyDate.
    • Reformatted test utility function calls and assert_eq! macros in tests.
  • src/range.rs
    • Adjusted indentation for FuzzyDateRange struct fields.
    • Added line breaks to RangeError::InvalidFormat message.
    • Reformatted FromStr implementation for FuzzyDateRange.
    • Adjusted indentation for TestCase struct fields in tests.
    • Added line breaks to FuzzyDateRange::new calls in tests.
    • Reformatted assert! macro calls in tests.
  • src/types.rs
    • Adjusted line breaks for consts import.
    • Reformatted Day::new error handling.
    • Adjusted line breaks for Day::try_from implementation.
    • Reformatted Year, Month, and Day try_into calls in tests.
    • Adjusted line breaks for ParseError::InvalidDay in tests.
    • Reformatted is_leap_year_cases test case descriptions.
    • Added line breaks to days_in_month assertions in tests.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

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 appears intended to apply formatting-only changes (rustfmt-style line wrapping/alignment) across core types, range parsing, and tests.

Changes:

  • Reformats constants imports and several error constructions in types.rs.
  • Reformats FuzzyDateRange parsing/tests in range.rs.
  • Reformats lib.rs (crate attributes, enum variants, parsing helpers, and test utilities/tests).

Reviewed changes

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

File Description
src/types.rs Formatting-only updates (imports, error construction, and test formatting).
src/range.rs Formatting changes in parsing logic and tests (but introduces a match-arm separator issue).
src/lib.rs Formatting changes across API, helpers, and tests (but introduces match-arm separator issues).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request consists of formatting changes across the codebase, likely from running rustfmt, aiming to improve code style and readability by applying standard Rust formatting conventions. While the formatting looks good and consistent, a security audit identified two potential Denial of Service (DoS) vulnerabilities. Specifically, there's a panic in Day::new due to missing validation of the month parameter, which can lead to an out-of-bounds array access. Additionally, a potential memory exhaustion issue exists in FuzzyDate::from_str where eager collection of split parts from untrusted input can cause significant memory amplification. Addressing these security concerns is crucial to improve the robustness of the library.

@tcrypt25519 tcrypt25519 merged commit ec08429 into main Feb 14, 2026
7 checks passed
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