Skip to content

Better cfg lints#16

Merged
AS1100K merged 3 commits intomasterfrom
better-cfg-lints
Aug 12, 2025
Merged

Better cfg lints#16
AS1100K merged 3 commits intomasterfrom
better-cfg-lints

Conversation

@AS1100K
Copy link
Copy Markdown
Owner

@AS1100K AS1100K commented Aug 5, 2025

Fixes #13

This PR removes build.rs as it was used to support rust version <1.54 by using cfg flags. It is not needed anymore because pastey crate only supports >=1.54 rust versions

@AS1100K AS1100K requested a review from Copilot August 5, 2025 18:41
Copy link
Copy Markdown

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 modernizes the codebase by removing legacy Rust version compatibility code. Since the pastey crate now only supports Rust versions >=1.54, the conditional compilation logic for older versions is no longer needed.

  • Removes the entire build.rs file that was used to detect Rust version and set cfg flags
  • Moves imports from conditional compilation blocks to the top-level imports in lib.rs
  • Removes the no_literal_fromstr cfg check that was used for Rust <1.54 compatibility

Reviewed Changes

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

File Description
build.rs Completely removed - was only needed for Rust <1.54 compatibility
src/lib.rs Moved LexError, Literal, and FromStr imports to top-level and removed conditional compilation block

@AS1100K AS1100K merged commit 3580144 into master Aug 12, 2025
17 checks passed
@AS1100K AS1100K deleted the better-cfg-lints branch August 12, 2025 04:08
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.

[Suggestion] Better way to set cfg-lints

2 participants