Skip to content

Commit

Permalink
thanks clipppy
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Aug 13, 2022
1 parent bd64387 commit b139d70
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion git-date/src/time/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ impl Time {
}

impl Time {
fn to_time(&self) -> time::OffsetDateTime {
fn to_time(self) -> time::OffsetDateTime {
time::OffsetDateTime::from_unix_timestamp(self.seconds_since_unix_epoch as i64)
.expect("always valid unix time")
.replace_offset(time::UtcOffset::from_whole_seconds(self.offset_in_seconds).expect("valid offset"))
Expand Down
5 changes: 0 additions & 5 deletions git-date/tests/time/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ mod format {
assert_eq!(time().format(git_date::time::format::SHORT), "1970-01-01");
}

#[test]
fn custom_string() {
assert_eq!(time().format("[year]-[month]-[day]"), "1970-01-01");
}

#[test]
fn custom_compile_time() {
assert_eq!(
Expand Down

0 comments on commit b139d70

Please sign in to comment.