Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
nekevss committed Feb 20, 2025
1 parent 1566796 commit ba44946
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 0 additions & 2 deletions src/builtins/compiled/duration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ impl Duration {
.lock()
.map_err(|_| TemporalError::general("Unable to acquire lock"))?;
self.round_with_provider(options, relative_to, &*provider)
.map(Into::into)
}

/// Returns the ordering between two [`Duration`], takes an optional
Expand All @@ -39,6 +38,5 @@ impl Duration {
.lock()
.map_err(|_| TemporalError::general("Unable to acquire lock"))?;
self.compare_with_provider(two, relative_to, &*provider)
.map(Into::into)
}
}
13 changes: 3 additions & 10 deletions src/builtins/compiled/zoneddatetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ impl ZonedDateTime {
.lock()
.map_err(|_| TemporalError::general("Unable to acquire lock"))?;
self.with_plain_time_and_provider(time, &*provider)
.map(Into::into)
}

/// Adds a [`Duration`] to the current `ZonedDateTime`.
Expand All @@ -309,7 +308,6 @@ impl ZonedDateTime {
.lock()
.map_err(|_| TemporalError::general("Unable to acquire lock"))?;
self.add_with_provider(duration, overflow, &*provider)
.map(Into::into)
}

/// Subtracts a [`Duration`] to the current `ZonedDateTime`.
Expand All @@ -324,7 +322,6 @@ impl ZonedDateTime {
.lock()
.map_err(|_| TemporalError::general("Unable to acquire lock"))?;
self.subtract_with_provider(duration, overflow, &*provider)
.map(Into::into)
}

/// Returns a [`Duration`] representing the period of time from this `ZonedDateTime` since the other `ZonedDateTime`.
Expand All @@ -335,7 +332,6 @@ impl ZonedDateTime {
.lock()
.map_err(|_| TemporalError::general("Unable to acquire lock"))?;
self.since_with_provider(other, options, &*provider)
.map(Into::into)
}

/// Returns a [`Duration`] representing the period of time from this `ZonedDateTime` since the other `ZonedDateTime`.
Expand All @@ -346,7 +342,6 @@ impl ZonedDateTime {
.lock()
.map_err(|_| TemporalError::general("Unable to acquire lock"))?;
self.until_with_provider(other, options, &*provider)
.map(Into::into)
}

/// Returns the start of day for the current `ZonedDateTime`.
Expand All @@ -356,7 +351,7 @@ impl ZonedDateTime {
let provider = TZ_PROVIDER
.lock()
.map_err(|_| TemporalError::general("Unable to acquire lock"))?;
self.start_of_day_with_provider(&*provider).map(Into::into)
self.start_of_day_with_provider(&*provider)
}

/// Creates a new [`PlainDate`] from this `ZonedDateTime`.
Expand All @@ -366,7 +361,7 @@ impl ZonedDateTime {
let provider = TZ_PROVIDER
.lock()
.map_err(|_| TemporalError::general("Unable to acquire lock"))?;
self.to_plain_date_with_provider(&*provider).map(Into::into)
self.to_plain_date_with_provider(&*provider)
}

/// Creates a new [`PlainTime`] from this `ZonedDateTime`.
Expand All @@ -376,7 +371,7 @@ impl ZonedDateTime {
let provider = TZ_PROVIDER
.lock()
.map_err(|_| TemporalError::general("Unable to acquire lock"))?;
self.to_plain_time_with_provider(&*provider).map(Into::into)
self.to_plain_time_with_provider(&*provider)
}

/// Creates a new [`PlainDateTime`] from this `ZonedDateTime`.
Expand All @@ -387,7 +382,6 @@ impl ZonedDateTime {
.lock()
.map_err(|_| TemporalError::general("Unable to acquire lock"))?;
self.to_plain_datetime_with_provider(&*provider)
.map(Into::into)
}

/// Returns a RFC9557 (IXDTF) string with the provided options.
Expand Down Expand Up @@ -424,7 +418,6 @@ impl ZonedDateTime {
.lock()
.map_err(|_| TemporalError::general("Unable to acquire lock"))?;
ZonedDateTime::from_str_with_provider(source, disambiguation, offset_option, &*provider)
.map(Into::into)
}
}

Expand Down

0 comments on commit ba44946

Please sign in to comment.