From 4f57ce2fdb5f66397e0a022bfd86a7fb28e4eef1 Mon Sep 17 00:00:00 2001 From: Cameron Dershem Date: Sat, 22 Jun 2019 09:18:08 -0400 Subject: [PATCH] Clippy fixes. --- examples/either/src/main.rs | 2 +- examples/powerful-extractors/src/main.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/either/src/main.rs b/examples/either/src/main.rs index 83e1fcf..3ecd892 100644 --- a/examples/either/src/main.rs +++ b/examples/either/src/main.rs @@ -14,7 +14,7 @@ fn index(_req: HttpRequest) -> RegisterResult { // <- variant B Box::new(ok(HttpResponse::Ok() .content_type("text/html") - .body(format!("Hello!")))), + .body("Hello!".to_string()))), ) } } diff --git a/examples/powerful-extractors/src/main.rs b/examples/powerful-extractors/src/main.rs index 8b8fe7e..5d80d7f 100644 --- a/examples/powerful-extractors/src/main.rs +++ b/examples/powerful-extractors/src/main.rs @@ -9,12 +9,12 @@ struct Event { tags: Vec, } -fn store_in_db(timestamp: f64, kind: &String, tags: &Vec) -> Event { +fn store_in_db(timestamp: f64, kind: &str, tags: &[String]) -> Event { // store item in db and get new_event // use id to lookup item Event { id: Some(1), - timestamp: timestamp, + timestamp, kind: kind.to_string(), tags: tags.to_vec(), }