From 5503b3236babec939cd019b2a38596b3e5cabb12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E6=89=8B=E6=8E=89=E5=8C=85=E5=B7=A5=E7=A8=8B?= =?UTF-8?q?=E5=B8=88?= Date: Thu, 13 Jul 2023 22:53:22 +0800 Subject: [PATCH] Fix CI (#2086) - Use exactly version 1.0.0-rc.3 of hyper - Update expected output of UI tests - Fix clippy lints Signed-off-by: hi-rustin --- axum-extra/src/json_lines.rs | 2 +- axum-macros/tests/typed_path/fail/not_deserialize.stderr | 2 +- axum/Cargo.toml | 2 +- axum/src/extract/matched_path.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/axum-extra/src/json_lines.rs b/axum-extra/src/json_lines.rs index 5dbbf263..f7bc506d 100644 --- a/axum-extra/src/json_lines.rs +++ b/axum-extra/src/json_lines.rs @@ -215,7 +215,7 @@ mod tests { let res = client .post("/") .body( - vec![ + [ "{\"id\":1}", "{\"id\":2}", "{\"id\":3}", diff --git a/axum-macros/tests/typed_path/fail/not_deserialize.stderr b/axum-macros/tests/typed_path/fail/not_deserialize.stderr index 3f2c9ad5..b476b44f 100644 --- a/axum-macros/tests/typed_path/fail/not_deserialize.stderr +++ b/axum-macros/tests/typed_path/fail/not_deserialize.stderr @@ -13,7 +13,7 @@ error[E0277]: the trait bound `for<'de> MyPath: serde::de::Deserialize<'de>` is (T0, T1) (T0, T1, T2) (T0, T1, T2, T3) - and 129 others + and $N others = note: required for `MyPath` to implement `serde::de::DeserializeOwned` = note: required for `axum::extract::Path` to implement `FromRequestParts` = note: this error originates in the derive macro `TypedPath` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/axum/Cargo.toml b/axum/Cargo.toml index 7cd575fb..a1a37573 100644 --- a/axum/Cargo.toml +++ b/axum/Cargo.toml @@ -51,7 +51,7 @@ tower-layer = "0.3.2" tower-service = "0.3" # wont need this when axum uses http-body 1.0 -hyper1 = { package = "hyper", version = "1.0.0-rc.3", features = ["server", "http1"] } +hyper1 = { package = "hyper", version = "=1.0.0-rc.3", features = ["server", "http1"] } tower-hyper-http-body-compat = { version = "0.1.4", features = ["server", "http1"] } # optional dependencies diff --git a/axum/src/extract/matched_path.rs b/axum/src/extract/matched_path.rs index ae7d130d..a3fb5800 100644 --- a/axum/src/extract/matched_path.rs +++ b/axum/src/extract/matched_path.rs @@ -139,7 +139,7 @@ pub(crate) fn set_matched_path_for_request( if matched_path.ends_with(NEST_TAIL_PARAM_CAPTURE) { extensions.insert(MatchedNestedPath(matched_path)); - debug_assert!(matches!(extensions.remove::(), None)); + debug_assert!(extensions.remove::().is_none()); } else { extensions.insert(MatchedPath(matched_path)); extensions.remove::();