Skip to content

Commit

Permalink
Add #[track_caller] to LocalResult::unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
pitdicker committed May 4, 2023
1 parent 895d3b8 commit 158297d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/offset/mod.rs
Expand Up @@ -191,6 +191,7 @@ impl<Tz: TimeZone> LocalResult<Date<Tz>> {
impl<T: fmt::Debug> LocalResult<T> {
/// Returns the single unique conversion result, or panics accordingly.
#[must_use]
#[track_caller]
pub fn unwrap(self) -> T {
match self {
LocalResult::None => panic!("No such local time"),
Expand Down

0 comments on commit 158297d

Please sign in to comment.