Skip to content
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

improve doc comment and tests for timestamp_nanos_opt #1299

Merged
merged 1 commit into from
Sep 18, 2023

Conversation

mlegner
Copy link
Contributor

@mlegner mlegner commented Sep 18, 2023

  • The doc comment for DateTime::timestamp_nanos_opt (added in Add timestamp_nanos_opt, deprecate timestamp_nanos #1275) incorrectly described a panic, which is actually an error.
  • The lower and upper limits of valid timestamps were not precise (both for DateTime and NaiveDateTime and both timestamp_nanos and timestamp_nanos_opt). This commit adds the precise limits to all methods and doctests for those limits to DateTime::timestamp_nanos_opt.

- The doc comment for `DateTime::timestamp_nanos_opt` incorrectly
  described a panic, which is actually an error.
- The lower and upper limits of valid timestamps were not precise
  (both for `DateTime` and `NaiveDateTime` and both `timestamp_nanos`
  and `timestamp_nanos_opt`).
  This commit adds the precise limits to all methods and doctests for
  those limits to `DateTime::timestamp_nanos_opt`.
@codecov
Copy link

codecov bot commented Sep 18, 2023

Codecov Report

Merging #1299 (7355e96) into 0.4.x (e730c6a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##            0.4.x    #1299   +/-   ##
=======================================
  Coverage   91.35%   91.36%           
=======================================
  Files          38       38           
  Lines       17034    17042    +8     
=======================================
+ Hits        15562    15570    +8     
  Misses       1472     1472           
Files Changed Coverage Δ
src/naive/datetime/mod.rs 97.39% <ø> (ø)
src/datetime/mod.rs 86.25% <100.00%> (+0.16%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@djc djc left a comment

Choose a reason for hiding this comment

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

Thanks!

@pitdicker pitdicker merged commit bc9d070 into chronotope:0.4.x Sep 18, 2023
37 checks passed
@mlegner mlegner deleted the timestamp_nanos_opt-docs branch September 18, 2023 09:11
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.

3 participants