]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/common: add discard_result() to errorator
authorKefu Chai <kchai@redhat.com>
Mon, 5 Jul 2021 14:53:21 +0000 (22:53 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 5 Jul 2021 15:26:13 +0000 (23:26 +0800)
so we can discard result explicitly.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/common/errorator.h

index f9ec7bf4a3f14685025514016b3c4e9abb9c07e7..8a821d17b2c1583d061edde896a6a0bb1e4716a9 100644 (file)
@@ -641,6 +641,11 @@ private:
       });
     }
 
+    _future<::crimson::errorated_future_marker<void>>
+    discard_result() noexcept {
+      return safe_then([](auto&&) {});
+    }
+
     // taking ErrorFuncOne and ErrorFuncTwo separately from ErrorFuncTail
     // to avoid SFINAE
     template <class ValueFunc,