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:
Jonathan Johnson
2022-03-01 17:49:10 +01:00
committed by GitHub
parent 87638d07cf
commit d083d7f125
+2 -2
View File
@@ -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> {