Skip to content

Commit 4945380

Browse files
committed
Fix some Clippy warnings on apple
I think these never showed up in CI before, because we've never run clippy on Rust stable on apple until now.
1 parent e389b87 commit 4945380

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/test_sendfile.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ fn test_sendfile_dragonfly() {
159159
fn test_sendfile_darwin() {
160160
// Declare the content
161161
let header_strings =
162-
vec!["HTTP/1.1 200 OK\n", "Content-Type: text/plain\n", "\n"];
162+
["HTTP/1.1 200 OK\n", "Content-Type: text/plain\n", "\n"];
163163
let body = "Xabcdef123456";
164164
let body_offset = 1;
165-
let trailer_strings = vec!["\n", "Served by Make Believe\n"];
165+
let trailer_strings = ["\n", "Served by Make Believe\n"];
166166

167167
// Write the body to a file
168168
let mut tmp = tempfile().unwrap();
@@ -195,7 +195,7 @@ fn test_sendfile_darwin() {
195195
+ &trailer_strings.concat();
196196

197197
// Verify the message that was sent
198-
assert_eq!(bytes_written as usize, expected_string.as_bytes().len());
198+
assert_eq!(bytes_written as usize, expected_string.len());
199199

200200
let mut read_string = String::new();
201201
let bytes_read = rd.read_to_string(&mut read_string).unwrap();

0 commit comments

Comments
 (0)