mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-28 00:00:20 +02:00
Using fully qualified path for Extension (#812)
When updating code this morning, I initially stumbled as I tried to use `axum::Extension`, but was met with an error. After going to the docs, I saw that Extension isn't exported at the top level.
This commit is contained in:
@@ -14,7 +14,7 @@ use tower_service::Service;
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
#[deprecated(
|
||||
since = "0.4.7",
|
||||
note = "Use `axum::Extension` instead. It implements `tower::Layer`"
|
||||
note = "Use `axum::extract::Extension` instead. It implements `tower::Layer`"
|
||||
)]
|
||||
pub struct AddExtensionLayer<T> {
|
||||
value: T,
|
||||
@@ -59,7 +59,7 @@ impl<S, T> AddExtension<S, T> {
|
||||
/// Create a new [`AddExtensionLayer`].
|
||||
#[deprecated(
|
||||
since = "0.4.7",
|
||||
note = "Use `axum::Extension` instead. It implements `tower::Layer`"
|
||||
note = "Use `axum::extract::Extension` instead. It implements `tower::Layer`"
|
||||
)]
|
||||
#[allow(deprecated)]
|
||||
pub fn layer(value: T) -> AddExtensionLayer<T> {
|
||||
|
||||
Reference in New Issue
Block a user