aboutsummaryrefslogtreecommitdiff
path: root/src/manager/builder.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/manager/builder.rs')
-rw-r--r--src/manager/builder.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/manager/builder.rs b/src/manager/builder.rs
index e5fe2da..a5f04f2 100644
--- a/src/manager/builder.rs
+++ b/src/manager/builder.rs
@@ -162,11 +162,9 @@ fn find_psk<'a>(
src: &'a Source,
p: &proto::Peer,
) -> Result<Option<&'a model::Key>, Error> {
- let want = gc.peers.get(&p.public_key);
- let want = if let Some(v) = want {
- v
- } else {
- return Ok(None);
+ let want = match gc.peers.get(&p.public_key) {
+ Some(v) => v,
+ None => return Ok(None),
};
if let Some(ref want_src) = &want.source {