adjust visibility of inner response

This commit is contained in:
TotallyNot 2024-04-04 16:27:00 +02:00
parent eeba5647f9
commit f1d8ddc9b8
5 changed files with 11 additions and 7 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "torn-api-macros"
version = "0.3.0"
version = "0.3.1"
edition = "2021"
authors = ["Pyrit [2111649]"]
license = "MIT"

View file

@ -141,7 +141,7 @@ fn impl_api_category(ast: &syn::DeriveInput) -> TokenStream {
);
let gen = quote! {
pub struct Response(crate::ApiResponse);
pub struct Response(pub crate::ApiResponse);
impl Response {
#(#accessors)*

View file

@ -1,6 +1,6 @@
[package]
name = "torn-api"
version = "0.7.0"
version = "0.7.1"
edition = "2021"
rust-version = "1.75.0"
authors = ["Pyrit [2111649]"]
@ -39,7 +39,7 @@ reqwest = { version = "0.11", default-features = false, features = [ "json" ], o
awc = { version = "3", default-features = false, optional = true }
rust_decimal = { version = "1", default-features = false, optional = true, features = [ "serde" ] }
torn-api-macros = { path = "../torn-api-macros", version = "0.3" }
torn-api-macros = { path = "../torn-api-macros", version = "0.3.1" }
[dev-dependencies]
actix-rt = { version = "2.7.0" }

View file

@ -1,6 +1,6 @@
[package]
name = "torn-key-pool"
version = "0.8.1"
version = "0.8.2"
edition = "2021"
authors = ["Pyrit [2111649]"]
license = "MIT"

View file

@ -29,7 +29,9 @@ where
where
A: ApiSelection,
{
request.comment = self.options.comment.clone();
if request.comment.is_none() {
request.comment = self.options.comment.clone();
}
if let Some(hook) = self.options.hooks_before.get(&std::any::TypeId::of::<A>()) {
let concrete = hook
.downcast_ref::<BeforeHook<A, S::Key, S::Domain>>()
@ -113,7 +115,9 @@ where
}
};
request.comment = self.options.comment.clone();
if request.comment.is_none() {
request.comment = self.options.comment.clone();
}
let request_ref = &request;
let tuples =