Skip to content

Commit

Permalink
Add track_caller attribute to Result::unwrap_or_else
Browse files Browse the repository at this point in the history
  • Loading branch information
ravenclaw900 committed Oct 1, 2023
1 parent c16823d commit ba0b7f0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/core/src/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1422,6 +1422,7 @@ impl<T, E> Result<T, E> {
/// assert_eq!(Err("foo").unwrap_or_else(count), 3);
/// ```
#[inline]
#[track_caller]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn unwrap_or_else<F: FnOnce(E) -> T>(self, op: F) -> T {
match self {
Expand Down

0 comments on commit ba0b7f0

Please sign in to comment.