Skip to content

Commit 1391fa7

Browse files
committed
Fix linting issues
1 parent bce1ad9 commit 1391fa7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

benches/parse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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));

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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),

0 commit comments

Comments
 (0)