Skip to content

Commit bbcce3d

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 bbcce3d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/test_sendfile.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,10 @@ fn test_sendfile_dragonfly() {
158158
#[test]
159159
fn test_sendfile_darwin() {
160160
// Declare the content
161-
let header_strings =
162-
vec!["HTTP/1.1 200 OK\n", "Content-Type: text/plain\n", "\n"];
161+
let header_strings = ["HTTP/1.1 200 OK\n", "Content-Type: text/plain\n", "\n"];
163162
let body = "Xabcdef123456";
164163
let body_offset = 1;
165-
let trailer_strings = vec!["\n", "Served by Make Believe\n"];
164+
let trailer_strings = ["\n", "Served by Make Believe\n"];
166165

167166
// Write the body to a file
168167
let mut tmp = tempfile().unwrap();
@@ -195,7 +194,7 @@ fn test_sendfile_darwin() {
195194
+ &trailer_strings.concat();
196195

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

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

0 commit comments

Comments
 (0)