[#45] Fixed clippy errors
All checks were successful
continuous-integration/drone the build was successful

This commit is contained in:
Jef Roosens 2021-05-11 22:11:35 +02:00
parent c8bfc16af8
commit faa4f713c8
Signed by: Jef Roosens
GPG key ID: 955C0660072F691F
3 changed files with 10 additions and 9 deletions

View file

@ -23,9 +23,9 @@ use rocket_contrib::databases::diesel;
#[cfg(feature = "frontend")]
use rocket_contrib::serve::StaticFiles;
pub struct CORS;
pub struct Cors;
impl Fairing for CORS {
impl Fairing for Cors {
fn info(&self) -> Info {
Info {
name: "Add CORS headers to responses",
@ -63,8 +63,9 @@ fn run_db_migrations(rocket: Rocket) -> Result<Rocket, Rocket> {
fn rocket() -> rocket::Rocket {
// This needs to be muted for the frontend feature
#[allow(unused_mut)]
let mut rocket = rocket::ignite()
.attach(CORS)
.attach(Cors)
.attach(FejDbConn::fairing())
.attach(AdHoc::on_attach("Database Migrations", run_db_migrations))
.mount("/api/ivago", routes::ivago()) // /api being hardcoded is temporary