mirror of
https://github.com/actix/actix-web.git
synced 2024-11-13 04:11:09 +00:00
chore: clippy
This commit is contained in:
parent
1e2ef6f92f
commit
022b052bd9
4 changed files with 6 additions and 6 deletions
|
@ -706,7 +706,7 @@ where
|
|||
|
||||
req.head_mut().peer_addr = *this.peer_addr;
|
||||
|
||||
req.conn_data = this.conn_data.as_ref().map(Rc::clone);
|
||||
req.conn_data = this.conn_data.clone();
|
||||
|
||||
match this.codec.message_type() {
|
||||
// request has no payload
|
||||
|
|
|
@ -126,7 +126,7 @@ where
|
|||
head.headers = parts.headers.into();
|
||||
head.peer_addr = this.peer_addr;
|
||||
|
||||
req.conn_data = this.conn_data.as_ref().map(Rc::clone);
|
||||
req.conn_data = this.conn_data.clone();
|
||||
|
||||
let fut = this.flow.service.call(req);
|
||||
let config = this.config.clone();
|
||||
|
|
|
@ -80,18 +80,18 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn comma_delimited_parsing() {
|
||||
let headers = vec![];
|
||||
let headers = [];
|
||||
let res: Vec<usize> = from_comma_delimited(headers.iter()).unwrap();
|
||||
assert_eq!(res, vec![0; 0]);
|
||||
|
||||
let headers = vec![
|
||||
let headers = [
|
||||
HeaderValue::from_static("1, 2"),
|
||||
HeaderValue::from_static("3,4"),
|
||||
];
|
||||
let res: Vec<usize> = from_comma_delimited(headers.iter()).unwrap();
|
||||
assert_eq!(res, vec![1, 2, 3, 4]);
|
||||
|
||||
let headers = vec![
|
||||
let headers = [
|
||||
HeaderValue::from_static(""),
|
||||
HeaderValue::from_static(","),
|
||||
HeaderValue::from_static(" "),
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use std::cell::RefCell;
|
||||
|
||||
thread_local! {
|
||||
static NOTIFY_DROPPED: RefCell<Option<bool>> = RefCell::new(None);
|
||||
static NOTIFY_DROPPED: RefCell<Option<bool>> = const { RefCell::new(None) };
|
||||
}
|
||||
|
||||
/// Check if the spawned task is dropped.
|
||||
|
|
Loading…
Reference in a new issue