We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
unwrap_or_else
1 parent b4b070c commit fc843a9Copy full SHA for fc843a9
src/lib.rs
@@ -626,6 +626,9 @@ impl<T> CtOption<T> {
626
627
/// This returns the underlying value if it is `Some`
628
/// or the value produced by the provided closure otherwise.
629
+ ///
630
+ /// This operates in constant time, because the provided closure
631
+ /// is always called.
632
#[inline]
633
pub fn unwrap_or_else<F>(self, f: F) -> T
634
where
0 commit comments