diff --git a/Cargo.toml b/Cargo.toml index 5a34093..ab0b01c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aerosol" -version = "1.0.0-alpha.6" +version = "1.0.0-alpha.7" authors = ["Diggory Blake "] edition = "2018" description = "Simple dependency injection for Rust" diff --git a/src/axum.rs b/src/axum.rs index b6f357b..0cbda29 100644 --- a/src/axum.rs +++ b/src/axum.rs @@ -14,8 +14,9 @@ use axum::{ http::{request::Parts, StatusCode}, response::{IntoResponse, Response}, }; +use frunk::HCons; -use crate::{Aero, AsyncConstructibleResource, ConstructibleResource, Resource}; +use crate::{Aero, AsyncConstructibleResource, ConstructibleResource, Resource, ResourceList}; /// Type of axum Rejection returned when a resource cannot be acquired #[derive(Debug, thiserror::Error)] @@ -96,3 +97,9 @@ where .map_err(DependencyError::failed_to_construct::) } } + +impl FromRef>> for Aero { + fn from_ref(input: &Aero>) -> Self { + input.clone().into() + } +}