Skip to content

Commit

Permalink
Use exactly_one() instead of next()
Browse files Browse the repository at this point in the history
  • Loading branch information
upbqdn committed Dec 14, 2023
1 parent a3af2a7 commit 9e16ad5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions zebra-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ getblocktemplate-rpcs = [
]

shielded-scan = [
"itertools",
"jsonrpc",
"zcash_primitives",
"zcash_client_backend",
Expand Down
3 changes: 2 additions & 1 deletion zebra-utils/src/bin/scanning-results-reader/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use std::collections::HashMap;

use itertools::Itertools;
use jsonrpc::simple_http::SimpleHttpTransport;
use jsonrpc::Client;
use serde_json::value::RawValue;
Expand Down Expand Up @@ -50,7 +51,7 @@ pub fn main() {
.expect("Scanning key from the storage should be valid")
.0
.into_iter()
.next()
.exactly_one()
.expect("There should be exactly one dfvk");

let ufvk_with_acc_id = HashMap::from([(
Expand Down

0 comments on commit 9e16ad5

Please sign in to comment.