mirror of
https://github.com/actix/actix-website
synced 2024-11-27 18:12:57 +01:00
Clippy fixes.
This commit is contained in:
parent
339ac43814
commit
4f57ce2fdb
@ -14,7 +14,7 @@ fn index(_req: HttpRequest) -> RegisterResult {
|
|||||||
// <- variant B
|
// <- variant B
|
||||||
Box::new(ok(HttpResponse::Ok()
|
Box::new(ok(HttpResponse::Ok()
|
||||||
.content_type("text/html")
|
.content_type("text/html")
|
||||||
.body(format!("Hello!")))),
|
.body("Hello!".to_string()))),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,12 +9,12 @@ struct Event {
|
|||||||
tags: Vec<String>,
|
tags: Vec<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn store_in_db(timestamp: f64, kind: &String, tags: &Vec<String>) -> Event {
|
fn store_in_db(timestamp: f64, kind: &str, tags: &[String]) -> Event {
|
||||||
// store item in db and get new_event
|
// store item in db and get new_event
|
||||||
// use id to lookup item
|
// use id to lookup item
|
||||||
Event {
|
Event {
|
||||||
id: Some(1),
|
id: Some(1),
|
||||||
timestamp: timestamp,
|
timestamp,
|
||||||
kind: kind.to_string(),
|
kind: kind.to_string(),
|
||||||
tags: tags.to_vec(),
|
tags: tags.to_vec(),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user