aboutsummaryrefslogtreecommitdiff
path: root/src/garage/cli
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-11-09 13:34:14 +0100
committerAlex Auvolat <alex@adnab.me>2023-11-09 13:34:14 +0100
commit19ef1ec8e7fee3a6c670e6e35dfcc83f0801e604 (patch)
treec05c883a4c02c443987c466b49313062c92bf58c /src/garage/cli
parent8a2b1dd422fb57abe611d8c1cf3cb0b55f487189 (diff)
downloadgarage-19ef1ec8e7fee3a6c670e6e35dfcc83f0801e604.tar.gz
garage-19ef1ec8e7fee3a6c670e6e35dfcc83f0801e604.zip
layout: more refactoring
Diffstat (limited to 'src/garage/cli')
-rw-r--r--src/garage/cli/layout.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/garage/cli/layout.rs b/src/garage/cli/layout.rs
index 269d92f4..bffc81d3 100644
--- a/src/garage/cli/layout.rs
+++ b/src/garage/cli/layout.rs
@@ -1,3 +1,5 @@
+use std::sync::Arc;
+
use bytesize::ByteSize;
use format_table::format_table;
@@ -321,7 +323,7 @@ pub async fn fetch_layout(
.call(&rpc_host, SystemRpc::PullClusterLayout, PRIO_NORMAL)
.await??
{
- SystemRpc::AdvertiseClusterLayout(t) => Ok(t),
+ SystemRpc::AdvertiseClusterLayout(t) => Ok(Arc::try_unwrap(t).unwrap()),
resp => Err(Error::Message(format!("Invalid RPC response: {:?}", resp))),
}
}
@@ -334,7 +336,7 @@ pub async fn send_layout(
rpc_cli
.call(
&rpc_host,
- SystemRpc::AdvertiseClusterLayout(layout),
+ SystemRpc::AdvertiseClusterLayout(Arc::new(layout)),
PRIO_NORMAL,
)
.await??;