1
Fork 0

Minor cleanups.

- Reduce some function exposure.
- Fix some comment formatting.
This commit is contained in:
Nicholas Nethercote 2023-11-08 18:27:19 +11:00
parent 49908b4d90
commit b35e576657
5 changed files with 14 additions and 11 deletions

View file

@ -38,7 +38,9 @@ fn parse_attributes(field: &syn::Field) -> Attributes {
attrs
}
pub fn hash_stable_generic_derive(mut s: synstructure::Structure<'_>) -> proc_macro2::TokenStream {
pub(crate) fn hash_stable_generic_derive(
mut s: synstructure::Structure<'_>,
) -> proc_macro2::TokenStream {
let generic: syn::GenericParam = parse_quote!(__CTX);
s.add_bounds(synstructure::AddBounds::Generics);
s.add_impl_generic(generic);
@ -81,7 +83,7 @@ pub fn hash_stable_generic_derive(mut s: synstructure::Structure<'_>) -> proc_ma
)
}
pub fn hash_stable_derive(mut s: synstructure::Structure<'_>) -> proc_macro2::TokenStream {
pub(crate) fn hash_stable_derive(mut s: synstructure::Structure<'_>) -> proc_macro2::TokenStream {
let generic: syn::GenericParam = parse_quote!('__ctx);
s.add_bounds(synstructure::AddBounds::Generics);
s.add_impl_generic(generic);