mirror of
https://github.com/actix/actix-web.git
synced 2025-01-01 21:08:43 +00:00
Fix/suppress warnings
This commit is contained in:
parent
728b944360
commit
6406f56ca2
3 changed files with 6 additions and 3 deletions
|
@ -5,6 +5,7 @@ use derive_more::Display;
|
|||
#[derive(Display, Debug, PartialEq)]
|
||||
pub enum FilesError {
|
||||
/// Path is not a directory
|
||||
#[allow(dead_code)]
|
||||
#[display(fmt = "Path is not a directory. Unable to serve static files")]
|
||||
IsNotDirectory,
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ use futures::future::ok;
|
|||
use open_ssl::ssl::{SslAcceptor, SslFiletype, SslMethod, SslVerifyMode};
|
||||
use rust_tls::ClientConfig;
|
||||
|
||||
#[allow(unused)]
|
||||
fn ssl_acceptor() -> SslAcceptor {
|
||||
// load ssl keys
|
||||
let mut builder = SslAcceptor::mozilla_intermediate(SslMethod::tls()).unwrap();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use actix_web::{
|
||||
get, middleware, web, App, Error, HttpRequest, HttpResponse, HttpServer,
|
||||
};
|
||||
use actix_web::{get, web, HttpRequest};
|
||||
#[cfg(unix)]
|
||||
use actix_web::{middleware, App, Error, HttpResponse, HttpServer};
|
||||
|
||||
#[get("/resource1/{name}/index.html")]
|
||||
async fn index(req: HttpRequest, name: web::Path<String>) -> String {
|
||||
|
@ -8,6 +8,7 @@ async fn index(req: HttpRequest, name: web::Path<String>) -> String {
|
|||
format!("Hello: {}!\r\n", name)
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
async fn index_async(req: HttpRequest) -> Result<&'static str, Error> {
|
||||
println!("REQ: {:?}", req);
|
||||
Ok("Hello world!\r\n")
|
||||
|
|
Loading…
Reference in a new issue