style(lib): address most clippy lints
This commit is contained in:
committed by
Sean McArthur
parent
0f13719873
commit
0eaf304644
@@ -5,8 +5,8 @@ use futures_util::future::join;
|
||||
use hyper::service::{make_service_fn, service_fn};
|
||||
use hyper::{Body, Request, Response, Server};
|
||||
|
||||
static INDEX1: &'static [u8] = b"The 1st service!";
|
||||
static INDEX2: &'static [u8] = b"The 2nd service!";
|
||||
static INDEX1: &[u8] = b"The 1st service!";
|
||||
static INDEX2: &[u8] = b"The 2nd service!";
|
||||
|
||||
async fn index1(_: Request<Body>) -> Result<Response<Body>, hyper::Error> {
|
||||
Ok(Response::new(Body::from(INDEX1)))
|
||||
|
||||
@@ -71,5 +71,5 @@ async fn simple_file_send(filename: &str) -> Result<Response<Body>> {
|
||||
return Ok(internal_server_error());
|
||||
}
|
||||
|
||||
return Ok(not_found());
|
||||
Ok(not_found())
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ use futures_util::future;
|
||||
use hyper::service::Service;
|
||||
use hyper::{Body, Request, Response, Server};
|
||||
|
||||
const ROOT: &'static str = "/";
|
||||
const ROOT: &str = "/";
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Svc;
|
||||
|
||||
Reference in New Issue
Block a user