Skip to content

Commit e51c627

Browse files
committed
Fix clippy lints
1 parent 0675364 commit e51c627

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ mod tests {
9090
fn test_static() {
9191
let td = TempDir::new("conduit-static").unwrap();
9292
let root = td.path();
93-
let handler = Static::new(root.clone());
93+
let handler = Static::new(root);
9494
File::create(&root.join("Cargo.toml"))
9595
.unwrap()
9696
.write_all(b"[package]")
@@ -102,7 +102,7 @@ mod tests {
102102
"text/plain"
103103
);
104104
assert_eq!(res.headers().get(header::CONTENT_LENGTH).unwrap(), "9");
105-
assert_eq!(res.into_cow(), "[package]".as_bytes());
105+
assert_eq!(*res.into_cow(), b"[package]"[..]);
106106
}
107107

108108
#[test]
@@ -112,7 +112,7 @@ mod tests {
112112
fs::create_dir(&root.join("src")).unwrap();
113113
File::create(&root.join("src/fixture.css")).unwrap();
114114

115-
let handler = Static::new(root.clone());
115+
let handler = Static::new(root);
116116
let mut req = MockRequest::new(Method::GET, "/src/fixture.css");
117117
let res = handler.call(&mut req).expect("No response");
118118
assert_eq!(res.headers().get(header::CONTENT_TYPE).unwrap(), "text/css");
@@ -124,7 +124,7 @@ mod tests {
124124
let td = TempDir::new("conduit-static").unwrap();
125125
let root = td.path();
126126

127-
let handler = Static::new(root.clone());
127+
let handler = Static::new(root);
128128
let mut req = MockRequest::new(Method::GET, "/nope");
129129
let res = handler.call(&mut req).expect("No response");
130130
assert_eq!(res.status(), StatusCode::NOT_FOUND);
@@ -137,7 +137,7 @@ mod tests {
137137

138138
fs::create_dir(&root.join("foo")).unwrap();
139139

140-
let handler = Static::new(root.clone());
140+
let handler = Static::new(root);
141141
let mut req = MockRequest::new(Method::GET, "/foo");
142142
let res = handler.call(&mut req).expect("No response");
143143
assert_eq!(res.status(), StatusCode::NOT_FOUND);
@@ -148,7 +148,7 @@ mod tests {
148148
let td = TempDir::new("conduit-static").unwrap();
149149
let root = td.path();
150150
File::create(&root.join("test")).unwrap();
151-
let handler = Static::new(root.clone());
151+
let handler = Static::new(root);
152152
let mut req = MockRequest::new(Method::GET, "/test");
153153
let res = handler.call(&mut req).expect("No response");
154154
assert_eq!(res.status(), StatusCode::OK);

0 commit comments

Comments
 (0)