diff options
| author | levlam <levlam@telegram.org> | 2025-02-21 11:05:48 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2025-02-21 11:05:48 +0300 |
| commit | 7ac47c800a4d915eb05f8f79840e076d78059095 (patch) | |
| tree | b88a4aa5f5cb521c8d058b9368da678191f389a9 /tdutils/td | |
| parent | 9c3707581da56b67a8fbff103b87e3ad5126c072 (diff) | |
Simplify RwMutex usage.
Diffstat (limited to 'tdutils/td')
| -rw-r--r-- | tdutils/td/utils/port/RwMutex.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tdutils/td/utils/port/RwMutex.h b/tdutils/td/utils/port/RwMutex.h index 2b73d0873..9d1bc78af 100644 --- a/tdutils/td/utils/port/RwMutex.h +++ b/tdutils/td/utils/port/RwMutex.h @@ -9,7 +9,6 @@ #include "td/utils/port/config.h" #include "td/utils/common.h" -#include "td/utils/Status.h" #if TD_PORT_POSIX #include <pthread.h> @@ -60,12 +59,12 @@ class RwMutex { using ReadLock = std::unique_ptr<RwMutex, ReadUnlock>; using WriteLock = std::unique_ptr<RwMutex, WriteUnlock>; - Result<ReadLock> lock_read() TD_WARN_UNUSED_RESULT { + ReadLock lock_read() TD_WARN_UNUSED_RESULT { lock_read_unsafe(); return ReadLock(this); } - Result<WriteLock> lock_write() TD_WARN_UNUSED_RESULT { + WriteLock lock_write() TD_WARN_UNUSED_RESULT { lock_write_unsafe(); return WriteLock(this); } |
