mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-09-10 10:45:57 +03:00
Modify rustfmt file
This commit is contained in:
@@ -76,48 +76,22 @@ fn alive() -> Json<String> {
|
||||
#[get("/bwrs_static/<filename>")]
|
||||
fn static_files(filename: String) -> Result<Content<&'static [u8]>, Error> {
|
||||
match filename.as_ref() {
|
||||
"mail-github.png" => Ok(Content(
|
||||
ContentType::PNG,
|
||||
include_bytes!("../static/images/mail-github.png"),
|
||||
)),
|
||||
"logo-gray.png" => Ok(Content(
|
||||
ContentType::PNG,
|
||||
include_bytes!("../static/images/logo-gray.png"),
|
||||
)),
|
||||
"shield-white.png" => Ok(Content(
|
||||
ContentType::PNG,
|
||||
include_bytes!("../static/images/shield-white.png"),
|
||||
)),
|
||||
"error-x.svg" => Ok(Content(
|
||||
ContentType::SVG,
|
||||
include_bytes!("../static/images/error-x.svg"),
|
||||
)),
|
||||
"mail-github.png" => Ok(Content(ContentType::PNG, include_bytes!("../static/images/mail-github.png"))),
|
||||
"logo-gray.png" => Ok(Content(ContentType::PNG, include_bytes!("../static/images/logo-gray.png"))),
|
||||
"shield-white.png" => Ok(Content(ContentType::PNG, include_bytes!("../static/images/shield-white.png"))),
|
||||
"error-x.svg" => Ok(Content(ContentType::SVG, include_bytes!("../static/images/error-x.svg"))),
|
||||
"hibp.png" => Ok(Content(ContentType::PNG, include_bytes!("../static/images/hibp.png"))),
|
||||
|
||||
"bootstrap.css" => Ok(Content(
|
||||
ContentType::CSS,
|
||||
include_bytes!("../static/scripts/bootstrap.css"),
|
||||
)),
|
||||
"bootstrap-native.js" => Ok(Content(
|
||||
ContentType::JavaScript,
|
||||
include_bytes!("../static/scripts/bootstrap-native.js"),
|
||||
)),
|
||||
"identicon.js" => Ok(Content(
|
||||
ContentType::JavaScript,
|
||||
include_bytes!("../static/scripts/identicon.js"),
|
||||
)),
|
||||
"datatables.js" => Ok(Content(
|
||||
ContentType::JavaScript,
|
||||
include_bytes!("../static/scripts/datatables.js"),
|
||||
)),
|
||||
"datatables.css" => Ok(Content(
|
||||
ContentType::CSS,
|
||||
include_bytes!("../static/scripts/datatables.css"),
|
||||
)),
|
||||
"jquery-3.5.1.slim.js" => Ok(Content(
|
||||
ContentType::JavaScript,
|
||||
include_bytes!("../static/scripts/jquery-3.5.1.slim.js"),
|
||||
)),
|
||||
"bootstrap.css" => Ok(Content(ContentType::CSS, include_bytes!("../static/scripts/bootstrap.css"))),
|
||||
"bootstrap-native.js" => {
|
||||
Ok(Content(ContentType::JavaScript, include_bytes!("../static/scripts/bootstrap-native.js")))
|
||||
}
|
||||
"identicon.js" => Ok(Content(ContentType::JavaScript, include_bytes!("../static/scripts/identicon.js"))),
|
||||
"datatables.js" => Ok(Content(ContentType::JavaScript, include_bytes!("../static/scripts/datatables.js"))),
|
||||
"datatables.css" => Ok(Content(ContentType::CSS, include_bytes!("../static/scripts/datatables.css"))),
|
||||
"jquery-3.5.1.slim.js" => {
|
||||
Ok(Content(ContentType::JavaScript, include_bytes!("../static/scripts/jquery-3.5.1.slim.js")))
|
||||
}
|
||||
_ => err!(format!("Static file not found: {}", filename)),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user