librustzcash: Use "if let" syntax

This commit is contained in:
Jack Grigg 2020-01-14 22:33:33 -05:00
parent 620213a0f0
commit 21efaccc9f

View File

@ -24,9 +24,8 @@ fn test_key_agreement() {
let addr = loop {
let mut d = [0; 11];
rng.fill_bytes(&mut d);
match vk.to_payment_address(Diversifier(d), &params) {
Some(a) => break a,
None => {}
if let Some(a) = vk.to_payment_address(Diversifier(d), &params) {
break a;
}
};