diff --git a/Cargo.lock b/Cargo.lock index cb262f4..b0f3c61 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -303,7 +303,7 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lib" -version = "1.4.2-hotfix" +version = "1.4.3" dependencies = [ "axum", "into-response-derive", diff --git a/Cargo.toml b/Cargo.toml index f79c22a..87ebe02 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ homepage = "emberal.github.io" [package] name = "lib" -version = "1.4.2-hotfix" +version = "1.4.3" description = "A library with utilities and helper fuctions." edition = { workspace = true } rust-version = { workspace = true } diff --git a/examples/multipart_file/Cargo.lock b/examples/multipart_file/Cargo.lock index 0d3decd..05c4020 100644 --- a/examples/multipart_file/Cargo.lock +++ b/examples/multipart_file/Cargo.lock @@ -286,7 +286,7 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lib" -version = "1.4.2-hotfix" +version = "1.4.3" dependencies = [ "axum", "thiserror", diff --git a/src/serde/response.rs b/src/serde/response.rs index 8e928a8..e759d34 100644 --- a/src/serde/response.rs +++ b/src/serde/response.rs @@ -16,6 +16,12 @@ impl BaseResponse { } } +impl From for BaseResponse { + fn from(body: T) -> Self { + Self::new(env!("CARGO_PKG_VERSION"), body) + } +} + #[cfg(test)] mod tests { use super::*;