[#45] Fixed clippy errors
All checks were successful
continuous-integration/drone the build was successful
All checks were successful
continuous-integration/drone the build was successful
This commit is contained in:
parent
c8bfc16af8
commit
faa4f713c8
3 changed files with 10 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
Reference in a new issue