Skip to content

Commit e234d37

Browse files
committed
chore: better fix to the irrefutable if let warning
1 parent bedef8f commit e234d37

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

stackslib/src/net/api/getattachmentsinv.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,7 @@ 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-
#[allow(clippy::expect_used)]
100-
let pages_indexes_value = value
101-
.parse::<String>()
102-
.expect("parse from Cow<str> is always safe");
99+
let pages_indexes_value = value.to_string();
103100
for entry in pages_indexes_value.split(',') {
104101
if let Ok(page_index) = entry.parse::<u32>() {
105102
page_indexes.insert(page_index);

0 commit comments

Comments
 (0)