Skip to content

Commit 022b052

Browse files
committed
chore: clippy
1 parent 1e2ef6f commit 022b052

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

actix-http/src/h1/dispatcher.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ where
706706

707707
req.head_mut().peer_addr = *this.peer_addr;
708708

709-
req.conn_data = this.conn_data.as_ref().map(Rc::clone);
709+
req.conn_data = this.conn_data.clone();
710710

711711
match this.codec.message_type() {
712712
// request has no payload

actix-http/src/h2/dispatcher.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ where
126126
head.headers = parts.headers.into();
127127
head.peer_addr = this.peer_addr;
128128

129-
req.conn_data = this.conn_data.as_ref().map(Rc::clone);
129+
req.conn_data = this.conn_data.clone();
130130

131131
let fut = this.flow.service.call(req);
132132
let config = this.config.clone();

actix-http/src/header/utils.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,18 @@ mod tests {
8080

8181
#[test]
8282
fn comma_delimited_parsing() {
83-
let headers = vec![];
83+
let headers = [];
8484
let res: Vec<usize> = from_comma_delimited(headers.iter()).unwrap();
8585
assert_eq!(res, vec![0; 0]);
8686

87-
let headers = vec![
87+
let headers = [
8888
HeaderValue::from_static("1, 2"),
8989
HeaderValue::from_static("3,4"),
9090
];
9191
let res: Vec<usize> = from_comma_delimited(headers.iter()).unwrap();
9292
assert_eq!(res, vec![1, 2, 3, 4]);
9393

94-
let headers = vec![
94+
let headers = [
9595
HeaderValue::from_static(""),
9696
HeaderValue::from_static(","),
9797
HeaderValue::from_static(" "),

actix-http/src/notify_on_drop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use std::cell::RefCell;
66

77
thread_local! {
8-
static NOTIFY_DROPPED: RefCell<Option<bool>> = RefCell::new(None);
8+
static NOTIFY_DROPPED: RefCell<Option<bool>> = const { RefCell::new(None) };
99
}
1010

1111
/// Check if the spawned task is dropped.

0 commit comments

Comments
 (0)