diff options
author | Alex Auvolat <alex@adnab.me> | 2023-01-11 17:09:37 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-01-11 17:09:37 +0100 |
commit | dac254a6e7413498df0e3b626769c2d2be3a4cfb (patch) | |
tree | 3eca3ebc2d0c1f9c2c5029e3197bcc925eeafcfd /src/garage/main.rs | |
parent | 638c5a3ce006eba9d90a6358655ba2091423efd7 (diff) | |
parent | 94d723f27cea7aa58d11af3e18a165283b40f19a (diff) | |
download | garage-dac254a6e7413498df0e3b626769c2d2be3a4cfb.tar.gz garage-dac254a6e7413498df0e3b626769c2d2be3a4cfb.zip |
Merge branch 'main' into k2v-watch-range-2
Diffstat (limited to 'src/garage/main.rs')
-rw-r--r-- | src/garage/main.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/garage/main.rs b/src/garage/main.rs index 107b1389..736e11ec 100644 --- a/src/garage/main.rs +++ b/src/garage/main.rs @@ -173,7 +173,7 @@ async fn cli_command(opt: Opt) -> Result<(), Error> { let net_key_hex_str = opt .rpc_secret .as_ref() - .or_else(|| config.as_ref().map(|c| &c.rpc_secret)) + .or_else(|| config.as_ref().and_then(|c| c.rpc_secret.as_ref())) .ok_or("No RPC secret provided")?; let network_key = NetworkKey::from_slice( &hex::decode(net_key_hex_str).err_context("Invalid RPC secret key (bad hex)")?[..], |