Add track_caller attribute to Result::unwrap_or_else
This commit is contained in:
parent
c16823d757
commit
ba0b7f0f01
@ -1422,6 +1422,7 @@ pub fn unwrap_or(self, default: T) -> T {
|
||||
/// 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 {
|
||||
|
Loading…
Reference in New Issue
Block a user