File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -96,11 +96,13 @@ impl HttpRequest for RPCGetAttachmentsInvRequestHandler {
96
96
if key == "index_block_hash" {
97
97
index_block_hash = StacksBlockId :: from_hex ( & value) . ok ( ) ;
98
98
} 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
+ #[ allow( clippy:: expect_used) ]
100
+ let pages_indexes_value = value
101
+ . parse :: < String > ( )
102
+ . expect ( "parse from Cow<str> is always safe" ) ;
103
+ for entry in pages_indexes_value. split ( ',' ) {
104
+ if let Ok ( page_index) = entry. parse :: < u32 > ( ) {
105
+ page_indexes. insert ( page_index) ;
104
106
}
105
107
}
106
108
}
You can’t perform that action at this time.
0 commit comments