Skip to content

Commit 19743fc

Browse files
committed
fix: return value
Signed-off-by: Dup4 <lyuzhi.pan@gmail.com>
1 parent 3b0fa7d commit 19743fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/result/result.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class Result {
145145
template <typename F>
146146
R& NotOKThen(F&& f) {
147147
if (IsOK()) {
148-
return;
148+
return static_cast<R&>(*this);
149149
}
150150

151151
f(*this);

0 commit comments

Comments
 (0)