From 54f7c817894ffae3553d6f28e3ebdfcf3c8f5339 Mon Sep 17 00:00:00 2001 From: Joshua Batty Date: Mon, 20 Mar 2023 14:22:58 +1100 Subject: [PATCH] if let --- src/savings.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/savings.rs b/src/savings.rs index ae6dd250..91de92c7 100644 --- a/src/savings.rs +++ b/src/savings.rs @@ -79,8 +79,8 @@ impl Savings { let mut parameters = BTreeMap::new(); parameters.insert("asset".into(), asset.into()); parameters.insert("address".into(), address.into()); - if address_tag.is_some() { - parameters.insert("addressTag".into(), address_tag.unwrap().to_string()); + if let Some(address_tag) = address_tag { + parameters.insert("addressTag".into(), address_tag.to_string()); } parameters.insert("amount".into(), amount.to_string()); let request = build_signed_request(parameters, self.recv_window)?;