1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-10-02 00:02:02 +00:00

Merge pull request #1345 from JohnTitor/fix-warnings

Fix warnings
This commit is contained in:
Yuki Okushi 2020-02-08 04:17:04 +09:00 committed by GitHub
commit 63730c1f73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 3 deletions

View file

@ -56,3 +56,4 @@ jobs:
--skip=test_slow_request
--skip=test_connection_force_close
--skip=test_connection_server_close
--skip=test_connection_wait_queue_force_close

View file

@ -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,

View file

@ -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();

View file

@ -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")