mirror of
https://github.com/actix/actix-web.git
synced 2024-11-22 09:31:10 +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.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() {
|
match this.codec.message_type() {
|
||||||
// request has no payload
|
// request has no payload
|
||||||
|
|
|
@ -126,7 +126,7 @@ where
|
||||||
head.headers = parts.headers.into();
|
head.headers = parts.headers.into();
|
||||||
head.peer_addr = this.peer_addr;
|
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 fut = this.flow.service.call(req);
|
||||||
let config = this.config.clone();
|
let config = this.config.clone();
|
||||||
|
|
|
@ -80,18 +80,18 @@ mod tests {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn comma_delimited_parsing() {
|
fn comma_delimited_parsing() {
|
||||||
let headers = vec![];
|
let headers = [];
|
||||||
let res: Vec<usize> = from_comma_delimited(headers.iter()).unwrap();
|
let res: Vec<usize> = from_comma_delimited(headers.iter()).unwrap();
|
||||||
assert_eq!(res, vec![0; 0]);
|
assert_eq!(res, vec![0; 0]);
|
||||||
|
|
||||||
let headers = vec![
|
let headers = [
|
||||||
HeaderValue::from_static("1, 2"),
|
HeaderValue::from_static("1, 2"),
|
||||||
HeaderValue::from_static("3,4"),
|
HeaderValue::from_static("3,4"),
|
||||||
];
|
];
|
||||||
let res: Vec<usize> = from_comma_delimited(headers.iter()).unwrap();
|
let res: Vec<usize> = from_comma_delimited(headers.iter()).unwrap();
|
||||||
assert_eq!(res, vec![1, 2, 3, 4]);
|
assert_eq!(res, vec![1, 2, 3, 4]);
|
||||||
|
|
||||||
let headers = vec![
|
let headers = [
|
||||||
HeaderValue::from_static(""),
|
HeaderValue::from_static(""),
|
||||||
HeaderValue::from_static(","),
|
HeaderValue::from_static(","),
|
||||||
HeaderValue::from_static(" "),
|
HeaderValue::from_static(" "),
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
|
|
||||||
thread_local! {
|
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.
|
/// Check if the spawned task is dropped.
|
||||||
|
|
Loading…
Reference in a new issue