Sanitize returntype in macro

This commit is contained in:
Martin Berg Alstad 2024-08-05 01:46:35 +02:00
parent 865cc6ddb9
commit ee487540ac
4 changed files with 6 additions and 5 deletions

2
Cargo.lock generated
View File

@ -303,7 +303,7 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]] [[package]]
name = "lib" name = "lib"
version = "1.4.1-hotfix-hotfix-2" version = "1.4.2"
dependencies = [ dependencies = [
"axum", "axum",
"into-response-derive", "into-response-derive",

View File

@ -1,15 +1,16 @@
[workspace] [workspace]
members = ["crates/*"] members = ["crates/*"]
exclude = ["examples"]
[workspace.package] [workspace.package]
edition = "2021" edition = "2021"
rust-version = "1.79.0" rust-version = "1.80.0"
authors = ["Martin Berg Alstad"] authors = ["Martin Berg Alstad"]
homepage = "emberal.github.io" homepage = "emberal.github.io"
[package] [package]
name = "lib" name = "lib"
version = "1.4.1-hotfix-hotfix-2" version = "1.4.2"
description = "A library with utilities and helper fuctions." description = "A library with utilities and helper fuctions."
edition = { workspace = true } edition = { workspace = true }
rust-version = { workspace = true } rust-version = { workspace = true }

View File

@ -8,7 +8,7 @@ pub fn into_response_derive_impl(input: DeriveInput) -> TokenStream {
let expanded = quote! { let expanded = quote! {
impl IntoResponse for #name { impl IntoResponse for #name {
fn into_response(self) -> Response { fn into_response(self) -> axum::response::Response {
let version = env!("CARGO_PKG_VERSION"); let version = env!("CARGO_PKG_VERSION");
lib::serde::response::BaseResponse::new(version, self) lib::serde::response::BaseResponse::new(version, self)
.into_response() .into_response()

View File

@ -286,7 +286,7 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]] [[package]]
name = "lib" name = "lib"
version = "1.3.5" version = "1.4.2"
dependencies = [ dependencies = [
"axum", "axum",
"thiserror", "thiserror",