diff options
author | Toby Vincent <tobyv13@gmail.com> | 2022-03-17 20:00:28 -0500 |
---|---|---|
committer | Toby Vincent <tobyv13@gmail.com> | 2022-03-17 20:00:28 -0500 |
commit | d2b03697ebb8c63e16fceb925ca04093708a9c5e (patch) | |
tree | f01ebe32b6ac9d93889534cf52de7a9aad6c051e | |
parent | e18482558a43330cab726ae92518904be346a248 (diff) |
fix: update to new extension function
-rw-r--r-- | Cargo.lock | 4 | ||||
-rw-r--r-- | zoned/Cargo.toml | 2 | ||||
-rw-r--r-- | zoned/src/main.rs | 4 |
3 files changed, 5 insertions, 5 deletions
@@ -56,9 +56,9 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "axum" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157d3c6bef9a248ecf0492f05bb91019ced3c5b0f4cd9ec09b16d06596e1e743" +checksum = "c9f346c92c1e9a71d14fe4aaf7c2a5d9932cc4e5e48d8fb6641524416eb79ddd" dependencies = [ "async-trait", "axum-core", diff --git a/zoned/Cargo.toml b/zoned/Cargo.toml index 408a4d4..b00f8c1 100644 --- a/zoned/Cargo.toml +++ b/zoned/Cargo.toml @@ -13,7 +13,7 @@ description = "daemon for managing containers using systemd-nspawn and ZFS" [dependencies] anyhow = "1.0.53" -axum = { version = "0.4.6", features = ["json"] } +axum = { version = "0.4.8", features = ["json"] } figment = { version = "0.10.6", features = ["toml", "env", "test"] } serde = "1.0.136" serde_json = "1.0.79" diff --git a/zoned/src/main.rs b/zoned/src/main.rs index caff470..11180f3 100644 --- a/zoned/src/main.rs +++ b/zoned/src/main.rs @@ -1,4 +1,4 @@ -use axum::AddExtensionLayer; +use axum::extract::Extension; use figment::{ providers::{Env, Format, Serialized, Toml}, Figment, @@ -31,7 +31,7 @@ async fn main() { } }; - let routes = build_routes().layer(AddExtensionLayer::new(shared_state)); + let routes = build_routes().layer(Extension(shared_state)); let addr = SocketAddr::from(([127, 0, 0, 1], 3000)); debug!("listening on {}", addr); |