aboutsummaryrefslogtreecommitdiffhomepage
path: root/tdutils/td
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2025-02-21 11:05:48 +0300
committerlevlam <levlam@telegram.org>2025-02-21 11:05:48 +0300
commit7ac47c800a4d915eb05f8f79840e076d78059095 (patch)
treeb88a4aa5f5cb521c8d058b9368da678191f389a9 /tdutils/td
parent9c3707581da56b67a8fbff103b87e3ad5126c072 (diff)
Simplify RwMutex usage.
Diffstat (limited to 'tdutils/td')
-rw-r--r--tdutils/td/utils/port/RwMutex.h5
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);
}