Skip to content

Commit cfc7bfe

Browse files
committed
Improving RawClient::batch_call after review suggestion
1 parent d64aaff commit cfc7bfe

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/raw_client.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -683,10 +683,7 @@ impl<T: Read + Write> ElectrumApi for RawClient<T> {
683683

684684
for req_id in missing_responses.iter() {
685685
match self.recv(&receiver, *req_id) {
686-
Ok(mut resp) => answers.insert(
687-
resp["id"].as_u64().unwrap_or_default(),
688-
resp["result"].take(),
689-
),
686+
Ok(mut resp) => answers.insert(req_id, resp["result"].take()),
690687
Err(e) => {
691688
// In case of error our sender could still be left in the map, depending on where
692689
// the error happened. Just in case, try to remove it here

0 commit comments

Comments
 (0)