Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian-braun committed Oct 26, 2023
1 parent 305c572 commit c8a6c39
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,9 @@ pub enum TimeWindowError {

impl Debug for Time {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
// This implementation is tailor-made, because NaiveDateTime does not support
// the full range of Time. For some Time instances it wouldn't be
// possible to reconstruct them based on the Debug-representation ('∞').
let positive = self.0 >= 0;
let mut total = self.0.unsigned_abs();
let millis_part = total % 1000;
Expand Down

0 comments on commit c8a6c39

Please sign in to comment.