1
0
Fork 0
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:
Rob Ede 2024-02-12 23:02:45 +00:00
parent 1e2ef6f92f
commit 022b052bd9
No known key found for this signature in database
GPG key ID: 97C636207D3EF933
4 changed files with 6 additions and 6 deletions

View file

@ -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

View file

@ -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();

View file

@ -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(" "),

View file

@ -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.