Skip to content

Allow clippy::ref_option lint for serde::format_description. #732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 4, 2025
Merged

Allow clippy::ref_option lint for serde::format_description. #732

merged 1 commit into from
Mar 4, 2025

Conversation

wojciech-graj
Copy link
Contributor

time::serde::format_description! generates a serialize function that takes &Option<T>, which is picked up by the clippy::ref_option lint for an end user.

error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
  |
  | time::serde::format_description!(iso8601, Date, "[year]-[month]-[day]");
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_option

@wojciech-graj wojciech-graj changed the title Allow clippy::ref_option lint for serde::format_description. WIP: Allow clippy::ref_option lint for serde::format_description. Feb 23, 2025
@wojciech-graj wojciech-graj changed the title WIP: Allow clippy::ref_option lint for serde::format_description. Allow clippy::ref_option lint for serde::format_description. Feb 23, 2025
Copy link

codecov bot commented Feb 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.4%. Comparing base (ec327a2) to head (5800572).
Report is 5 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #732   +/-   ##
=====================================
  Coverage   93.4%   93.4%           
=====================================
  Files         89      89           
  Lines      10128   10129    +1     
=====================================
+ Hits        9458    9461    +3     
+ Misses       670     668    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jhpratt jhpratt merged commit 338f84f into time-rs:main Mar 4, 2025
22 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