Skip to content

Commit f87ac16

Browse files
committed
clippy::match_ref_pats 解消
1 parent 542f94e commit f87ac16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chapter2/src/2_8_3/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn read_request_line(req: &mut TcpStream) -> io::Result<String> {
2525
}
2626

2727
fn handle_http_request(req: &str, res: TcpStream) -> io::Result<()> {
28-
if let &["GET", "/", ..] = req.split_whitespace().collect::<Vec<_>>().as_slice() {
28+
if let ["GET", "/", ..] = req.split_whitespace().collect::<Vec<_>>().as_slice() {
2929
get_root(res)?;
3030
} else {
3131
eprintln!("cannot accept the following request: {}", req);

0 commit comments

Comments
 (0)