Skip to content

Commit 73ccb7b

Browse files
committed
Refactor: rename mutex_lock() to mutex()
1 parent 17726b5 commit 73ccb7b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

openraft/src/raft/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ where C: RaftTypeConfig
321321
tx_shutdown: std::sync::Mutex::new(Some(tx_shutdown)),
322322
core_state: std::sync::Mutex::new(CoreState::Running(core_handle)),
323323

324-
snapshot: C::mutex_lock(None),
324+
snapshot: C::mutex(None),
325325
};
326326

327327
Ok(Self { inner: Arc::new(inner) })

openraft/src/replication/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ where
189189
target,
190190
session_id,
191191
network,
192-
snapshot_network: Arc::new(C::mutex_lock(snapshot_network)),
192+
snapshot_network: Arc::new(C::mutex(snapshot_network)),
193193
snapshot_state: None,
194194
backoff: None,
195195
log_reader,

openraft/src/type_config/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ pub trait TypeConfigExt: RaftTypeConfig {
9696
///
9797
/// This is just a wrapper of
9898
/// [`AsyncRuntime::Mutex::new()`](`crate::async_runtime::Mutex::new`).
99-
fn mutex_lock<T>(value: T) -> MutexOf<Self, T>
99+
fn mutex<T>(value: T) -> MutexOf<Self, T>
100100
where T: OptionalSend {
101101
MutexOf::<Self, T>::new(value)
102102
}

0 commit comments

Comments
 (0)