Skip to content

Conversation

@mre
Copy link
Member

@mre mre commented Sep 5, 2025

This PR modernizes the Rust codebase with several improvements:

Changes Made

Rust 2024 Edition

  • Updated Cargo.toml edition to "2024"
  • Added comprehensive package metadata (description, license, repository, keywords, categories)

Enhanced Clippy Configuration

  • Added strict clippy lints with proper priority handling
  • Configured lint groups: correctness, suspicious, complexity, perf, style, cargo, nursery
  • Set appropriate warning levels and priorities to avoid conflicts

Code Improvements

  • Fixed chrono deprecation warnings: Updated deprecated DateTime::from_utc() and NaiveDate::signed_duration_since() calls to use current API
  • Enhanced error handling: Replaced unwrap() calls with safe pattern matching
  • Type safety improvements: Added explicit type annotations where needed

Dependency Updates

  • Updated all dependencies to latest compatible versions
  • Maintained backward compatibility

Build System Enhancements

  • Enhanced Makefile: Added development targets (check, clippy, fmt, test, clean, help)
  • Better developer experience: Clear targets for common development tasks

Testing

  • All changes tested successfully with make check and make render
  • No breaking changes to existing functionality
  • All clippy warnings addressed

Verification

The modernized codebase maintains full compatibility while providing:

  • Stricter code quality enforcement through enhanced linting
  • Better developer experience with improved build targets
  • Future-proofed code using latest Rust 2024 features
  • Updated dependencies for security and performance benefits

mre added 2 commits September 5, 2025 17:40
…nd general improvements

- Update Cargo.toml to Rust 2024 edition with comprehensive metadata
- Add strict clippy configuration with proper priority handling
- Fix chrono deprecation warnings in DateTime and NaiveDate usage
- Replace unwrap() calls with safe pattern matching
- Update dependencies to latest versions
- Enhance Makefile with development targets (check, clippy, fmt, test, clean, help)
- Add comprehensive lint groups for better code quality enforcement
- Maintain backward compatibility while modernizing codebase
@mre mre merged commit 293610a into master Sep 5, 2025
2 checks passed
@mre mre deleted the modernize-rust-codebase branch September 5, 2025 15:46
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