File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ fn many_requests(c: &mut Criterion) {
259259 ( "w3!r`d" , 20 ) ,
260260 ]
261261 . iter ( )
262- . flat_map ( |& ( method, count) | std:: iter:: repeat ( method) . take ( count) )
262+ . flat_map ( |& ( method, count) | std:: iter:: repeat_n ( method, count) )
263263 . map ( |method| format ! ( "{method} / HTTP/1.1\r \n \r \n " ) )
264264 . collect :: < Vec < _ > > ( ) ;
265265 SliceRandom :: shuffle ( & mut * requests, & mut StdRng :: seed_from_u64 ( 0 ) ) ;
Original file line number Diff line number Diff line change @@ -1892,7 +1892,7 @@ mod tests {
18921892 let mut headers = [ EMPTY_HEADER ; NUM_OF_HEADERS ] ;
18931893 let mut req = Request :: new ( & mut headers[ ..] ) ;
18941894 for i in 0 ..req_str. len ( ) {
1895- let status = req. parse ( req_str[ ..i] . as_bytes ( ) ) ;
1895+ let status = req. parse ( & req_str. as_bytes ( ) [ ..i] ) ;
18961896 assert_eq ! (
18971897 status,
18981898 Ok ( Status :: Partial ) ,
You can’t perform that action at this time.
0 commit comments