aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/layout
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-12-07 10:55:15 +0100
committerAlex Auvolat <alex@adnab.me>2023-12-07 10:57:21 +0100
commit95eb13eb08d517d328e3c8aeb222440a27211ee9 (patch)
tree4216b2172cb973f404b56b51546824cbfa966a7a /src/rpc/layout
parentc8356a91d9bf1d1488ec288099f2a55a1019918f (diff)
downloadgarage-95eb13eb08d517d328e3c8aeb222440a27211ee9.tar.gz
garage-95eb13eb08d517d328e3c8aeb222440a27211ee9.zip
rpc: refactor result tracking for quorum sets
Diffstat (limited to 'src/rpc/layout')
-rw-r--r--src/rpc/layout/manager.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rpc/layout/manager.rs b/src/rpc/layout/manager.rs
index c65831a2..17465019 100644
--- a/src/rpc/layout/manager.rs
+++ b/src/rpc/layout/manager.rs
@@ -352,6 +352,12 @@ impl<T> AsRef<T> for WriteLock<T> {
}
}
+impl<T> AsMut<T> for WriteLock<T> {
+ fn as_mut(&mut self) -> &mut T {
+ &mut self.value
+ }
+}
+
impl<T> Drop for WriteLock<T> {
fn drop(&mut self) {
let layout = self.layout_manager.layout(); // acquire read lock