From 7ceba17b79a943cdfa4b70962bb0498099b299cf Mon Sep 17 00:00:00 2001 From: zhengpeng <847850277@qq.com> Date: Thu, 31 Oct 2024 11:27:47 +0800 Subject: [PATCH] fix: cargo build fail (#966) --- crates/oapi-macros/src/response/link.rs | 2 +- crates/oapi-macros/src/schema_type.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/oapi-macros/src/response/link.rs b/crates/oapi-macros/src/response/link.rs index fcbc198b5..492be6635 100644 --- a/crates/oapi-macros/src/response/link.rs +++ b/crates/oapi-macros/src/response/link.rs @@ -9,7 +9,7 @@ use crate::{parse_utils, AnyValue, Server}; /// ("name" = (link)) #[derive(Debug)] -pub(crate) struct LinkTuple(pub parse_utils::LitStrOrExpr, pub Link); +pub(crate) struct LinkTuple(pub(crate) parse_utils::LitStrOrExpr, pub(crate) Link); impl Parse for LinkTuple { fn parse(input: syn::parse::ParseStream) -> syn::Result { diff --git a/crates/oapi-macros/src/schema_type.rs b/crates/oapi-macros/src/schema_type.rs index 66ad4ceac..54fb3f56c 100644 --- a/crates/oapi-macros/src/schema_type.rs +++ b/crates/oapi-macros/src/schema_type.rs @@ -43,8 +43,8 @@ impl ToTokens for SchemaTypeInner { /// Tokenizes OpenAPI data type correctly according to the Rust type pub(crate) struct SchemaType<'a> { - pub path: &'a syn::Path, - pub nullable: bool, + pub(crate) path: &'a syn::Path, + pub(crate) nullable: bool, } impl SchemaType<'_> {