Skip to content

Commit 251ea80

Browse files
committed
Fixed clippy warnings for warp from Rust 1.66.0
1 parent 08548f3 commit 251ea80

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

mithril-aggregator/src/http_server/routes/certificate_routes.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ use warp::Filter;
55

66
pub fn routes(
77
dependency_manager: Arc<DependencyManager>,
8-
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
8+
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
99
certificate_pending(dependency_manager.clone())
1010
.or(certificate_certificate_hash(dependency_manager))
1111
}
1212

1313
/// GET /certificate-pending
1414
fn certificate_pending(
1515
dependency_manager: Arc<DependencyManager>,
16-
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
16+
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
1717
warp::path!("certificate-pending")
1818
.and(warp::get())
1919
.and(middlewares::with_certificate_pending_store(
@@ -25,7 +25,7 @@ fn certificate_pending(
2525
/// GET /certificate/{certificate_hash}
2626
fn certificate_certificate_hash(
2727
dependency_manager: Arc<DependencyManager>,
28-
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
28+
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
2929
warp::path!("certificate" / String)
3030
.and(warp::get())
3131
.and(middlewares::with_certificate_store(dependency_manager))
@@ -95,7 +95,7 @@ mod tests {
9595

9696
fn setup_router(
9797
dependency_manager: Arc<DependencyManager>,
98-
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
98+
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
9999
let cors = warp::cors()
100100
.allow_any_origin()
101101
.allow_headers(vec!["content-type"])

mithril-aggregator/src/http_server/routes/epoch_routes.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ use warp::Filter;
55

66
pub fn routes(
77
dependency_manager: Arc<DependencyManager>,
8-
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
8+
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
99
epoch_settings(dependency_manager)
1010
}
1111

1212
/// GET /epoch-settings
1313
fn epoch_settings(
1414
dependency_manager: Arc<DependencyManager>,
15-
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
15+
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
1616
warp::path!("epoch-settings")
1717
.and(warp::get())
1818
.and(middlewares::with_protocol_parameters_store(
@@ -94,7 +94,7 @@ mod tests {
9494

9595
fn setup_router(
9696
dependency_manager: Arc<DependencyManager>,
97-
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
97+
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
9898
let cors = warp::cors()
9999
.allow_any_origin()
100100
.allow_headers(vec!["content-type"])

mithril-aggregator/src/http_server/routes/router.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use warp::Filter;
1414
/// Routes
1515
pub fn routes(
1616
dependency_manager: Arc<DependencyManager>,
17-
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
17+
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
1818
let cors = warp::cors()
1919
.allow_any_origin()
2020
.allow_headers(vec!["content-type"])

mithril-aggregator/src/http_server/routes/signatures_routes.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ use warp::Filter;
55

66
pub fn routes(
77
dependency_manager: Arc<DependencyManager>,
8-
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
8+
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
99
register_signatures(dependency_manager)
1010
}
1111

1212
/// POST /register-signatures
1313
fn register_signatures(
1414
dependency_manager: Arc<DependencyManager>,
15-
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
15+
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
1616
warp::path!("register-signatures")
1717
.and(warp::post())
1818
.and(warp::body::json())
@@ -68,7 +68,7 @@ mod tests {
6868

6969
fn setup_router(
7070
dependency_manager: Arc<DependencyManager>,
71-
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
71+
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
7272
let cors = warp::cors()
7373
.allow_any_origin()
7474
.allow_headers(vec!["content-type"])

mithril-aggregator/src/http_server/routes/signer_routes.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ use warp::Filter;
55

66
pub fn routes(
77
dependency_manager: Arc<DependencyManager>,
8-
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
8+
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
99
register_signer(dependency_manager)
1010
}
1111

1212
/// POST /register-signer
1313
fn register_signer(
1414
dependency_manager: Arc<DependencyManager>,
15-
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
15+
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
1616
warp::path!("register-signer")
1717
.and(warp::post())
1818
.and(warp::body::json())
@@ -80,7 +80,7 @@ mod tests {
8080

8181
fn setup_router(
8282
dependency_manager: Arc<DependencyManager>,
83-
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
83+
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
8484
let cors = warp::cors()
8585
.allow_any_origin()
8686
.allow_headers(vec!["content-type"])

mithril-aggregator/src/http_server/routes/snapshot_routes.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use warp::Filter;
55

66
pub fn routes(
77
dependency_manager: Arc<DependencyManager>,
8-
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
8+
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
99
snapshots(dependency_manager.clone())
1010
.or(serve_snapshots_dir(dependency_manager.clone()))
1111
.or(snapshot_download(dependency_manager.clone()))
@@ -15,7 +15,7 @@ pub fn routes(
1515
/// GET /snapshots
1616
fn snapshots(
1717
dependency_manager: Arc<DependencyManager>,
18-
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
18+
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
1919
warp::path!("snapshots")
2020
.and(warp::get())
2121
.and(middlewares::with_snapshot_store(dependency_manager))
@@ -25,7 +25,7 @@ fn snapshots(
2525
/// GET /snapshots/{digest}/download
2626
fn snapshot_download(
2727
dependency_manager: Arc<DependencyManager>,
28-
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
28+
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
2929
warp::path!("snapshot" / String / "download")
3030
.and(warp::get())
3131
.and(middlewares::with_config(dependency_manager.clone()))
@@ -35,7 +35,7 @@ fn snapshot_download(
3535

3636
fn serve_snapshots_dir(
3737
dependency_manager: Arc<DependencyManager>,
38-
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
38+
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
3939
let config = dependency_manager.config.clone();
4040

4141
warp::path("snapshot_download")
@@ -47,7 +47,7 @@ fn serve_snapshots_dir(
4747
/// GET /snapshot/digest
4848
fn snapshot_digest(
4949
dependency_manager: Arc<DependencyManager>,
50-
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
50+
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
5151
warp::path!("snapshot" / String)
5252
.and(warp::get())
5353
.and(middlewares::with_snapshot_store(dependency_manager))
@@ -182,7 +182,7 @@ mod tests {
182182

183183
fn setup_router(
184184
dependency_manager: Arc<DependencyManager>,
185-
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
185+
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
186186
let cors = warp::cors()
187187
.allow_any_origin()
188188
.allow_headers(vec!["content-type"])

0 commit comments

Comments
 (0)