diff --git a/CHANGELOG.md b/CHANGELOG.md index e55969e..2055a08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Removed `task_local_extensions` in favour of `http::Extensions`. - All extensions must be `Clone` now. - Replaced `with_arc` and `with_arc_init` methods with `with_box` and `with_box_init`. +- Support for `matchit` `0.8.0` - This means router matches like `/a/:some_var` need to be changed to `/a/{some_var}` ### Changed - `RequestBuilder::try_clone` now clones the extensions. diff --git a/reqwest-tracing/Cargo.toml b/reqwest-tracing/Cargo.toml index 08386f7..31587df 100644 --- a/reqwest-tracing/Cargo.toml +++ b/reqwest-tracing/Cargo.toml @@ -20,7 +20,7 @@ reqwest-middleware = { version = "0.3.0", path = "../reqwest-middleware" } anyhow = "1.0.70" async-trait = "0.1.51" -matchit = "0.7.3" +matchit = "0.8.0" http = "1" reqwest = { version = "0.12.0", default-features = false } tracing = "0.1.26" diff --git a/reqwest-tracing/src/reqwest_otel_span_builder.rs b/reqwest-tracing/src/reqwest_otel_span_builder.rs index 7ab94e0..c425eb8 100644 --- a/reqwest-tracing/src/reqwest_otel_span_builder.rs +++ b/reqwest-tracing/src/reqwest_otel_span_builder.rs @@ -267,9 +267,9 @@ impl OtelPathNames { /// /// ``` /// # use reqwest_tracing::OtelPathNames; - /// let path_names = OtelPathNames::known_paths(["/payment/:paymentId"]).unwrap(); + /// let path_names = OtelPathNames::known_paths(["/payment/{paymentId}"]).unwrap(); /// let path = path_names.find("/payment/payment-id-123"); - /// assert_eq!(path, Some("/payment/:paymentId")); + /// assert_eq!(path, Some("/payment/{paymentId}")); /// ``` pub fn find(&self, path: &str) -> Option<&str> { self.0.at(path).map(|mtch| mtch.value.as_str()).ok()