diff --git a/src/main.rs b/src/main.rs index c934b32..93c39a9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,7 +15,7 @@ use crate::{ }; use actix_web::{ http::header::{self, CacheControl, CacheDirective, Expires, LOCATION}, - middleware, web, App, Error as AError, HttpResponse, HttpServer, + middleware, web, App, Error, HttpResponse, HttpServer, }; use awc::{http::StatusCode, Client}; use futures::Future; @@ -24,7 +24,7 @@ use std::time::{Duration, SystemTime}; fn proxy_file( client: web::Data, data: web::Path, -) -> Box> { +) -> Box> { Box::new( client .get(&T::raw_url( @@ -57,7 +57,7 @@ fn proxy_file( fn redirect( client: web::Data, data: web::Path, -) -> Box> { +) -> Box> { Box::new( client .get(&T::api_url(&data)) @@ -84,9 +84,9 @@ fn redirect( }) .from_err(), ) - as Box>, + as Box>, code => Box::new(futures::future::ok(HttpResponse::build(code).finish())) - as Box>, + as Box>, }), ) } @@ -94,7 +94,7 @@ fn redirect( fn handle_request( client: web::Data, data: web::Path, -) -> Box> { +) -> Box> { if data.commit.len() == 40 { proxy_file::(client, data) } else {