Skip to content

Commit 376b1b5

Browse files
committed
Reorder __private exports and formatting fixes
Minor cleanup across crates: in crates/rustapi-rs/src/lib.rs the __private module re-exports were reordered to export async_trait before re-exporting rustapi_core::__private::* to clarify export order. In crates/rustapi-macros/src/lib.rs small formatting tweaks were applied (collapse crate_name branch to a single line and wrap the generate_rule_validation call) to improve readability.
1 parent ce73a92 commit 376b1b5

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

crates/rustapi-macros/src/lib.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -986,9 +986,7 @@ fn get_core_path() -> proc_macro2::TokenStream {
986986
quote! { ::#ident }
987987
}
988988
}
989-
} else if let Ok(found) =
990-
crate_name("rustapi-core").or_else(|_| crate_name("rustapi_core"))
991-
{
989+
} else if let Ok(found) = crate_name("rustapi-core").or_else(|_| crate_name("rustapi_core")) {
992990
match found {
993991
FoundCrate::Itself => quote! { crate },
994992
FoundCrate::Name(name) => {
@@ -1526,7 +1524,8 @@ pub fn derive_validate(input: TokenStream) -> TokenStream {
15261524
let validation = generate_async_rule_validation(&field_name, rule, &validate_path);
15271525
async_validations.push(validation);
15281526
} else {
1529-
let validation = generate_rule_validation(&field_name, field_type, rule, &validate_path);
1527+
let validation =
1528+
generate_rule_validation(&field_name, field_type, rule, &validate_path);
15301529
sync_validations.push(validation);
15311530
}
15321531
}

crates/rustapi-rs/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ pub use rustapi_macros::*;
7070
/// It shadows rustapi_core::__private from the glob re-export above.
7171
#[doc(hidden)]
7272
pub mod __private {
73-
pub use rustapi_core::__private::*;
7473
pub use async_trait;
74+
pub use rustapi_core::__private::*;
7575
}
7676

7777
// Re-export extras (feature-gated)

0 commit comments

Comments
 (0)