Fixed warnings

This commit is contained in:
Antoine Gersant 2019-04-07 23:28:31 -07:00
parent c8655a2447
commit 69c8c93277
3 changed files with 7 additions and 4 deletions

View file

@ -72,6 +72,7 @@ mod playlist;
mod serve;
mod server;
mod swagger;
#[cfg(test)]
mod test;
mod thumbnails;
mod ui;

View file

@ -1,4 +1,3 @@
use rocket::http::Status;
use rocket::response::NamedFile;
use rocket::State;
use std::io;
@ -6,7 +5,6 @@ use std::path::PathBuf;
use std::sync::Arc;
use crate::server::StaticDirs;
use crate::test::get_test_environment;
pub fn get_routes() -> Vec<rocket::Route> {
routes![
@ -30,6 +28,9 @@ fn files(static_dirs: State<Arc<StaticDirs>>, file: PathBuf) -> Option<NamedFile
#[test]
fn test_index() {
use rocket::http::Status;
use crate::test::get_test_environment;
let env = get_test_environment("swagger_index.sqlite");
let client = &env.client;
let response = client.get("/swagger").dispatch();

View file

@ -1,4 +1,3 @@
use rocket::http::Status;
use rocket::response::NamedFile;
use rocket::State;
use std::io;
@ -6,7 +5,6 @@ use std::path::PathBuf;
use std::sync::Arc;
use crate::server::StaticDirs;
use crate::test::get_test_environment;
pub fn get_routes() -> Vec<rocket::Route> {
routes![
@ -30,6 +28,9 @@ fn files(static_dirs: State<Arc<StaticDirs>>, file: PathBuf) -> Option<NamedFile
#[test]
fn test_index() {
use rocket::http::Status;
use crate::test::get_test_environment;
let env = get_test_environment("web_index.sqlite");
let client = &env.client;
let response = client.get("/").dispatch();