Skip to content

Commit 0b9b187

Browse files
authored
Merge pull request #5424 from stacks-network/fix/irrefutable-if-let
chore: remove irrefutable if let
2 parents c773444 + e234d37 commit 0b9b187

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

stackslib/src/net/api/getattachmentsinv.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,10 @@ impl HttpRequest for RPCGetAttachmentsInvRequestHandler {
9696
if key == "index_block_hash" {
9797
index_block_hash = StacksBlockId::from_hex(&value).ok();
9898
} else if key == "pages_indexes" {
99-
if let Ok(pages_indexes_value) = value.parse::<String>() {
100-
for entry in pages_indexes_value.split(',') {
101-
if let Ok(page_index) = entry.parse::<u32>() {
102-
page_indexes.insert(page_index);
103-
}
99+
let pages_indexes_value = value.to_string();
100+
for entry in pages_indexes_value.split(',') {
101+
if let Ok(page_index) = entry.parse::<u32>() {
102+
page_indexes.insert(page_index);
104103
}
105104
}
106105
}

0 commit comments

Comments
 (0)