From b848f5d1aa7755cc2c66fb12e949a2e6bc630e02 Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Mon, 14 Oct 2024 08:34:04 +0200 Subject: [PATCH] Fix use of std without :: in derive macro --- dummy_derive/src/lib.rs | 2 +- fake/src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dummy_derive/src/lib.rs b/dummy_derive/src/lib.rs index b84e7d7..7ec584d 100644 --- a/dummy_derive/src/lib.rs +++ b/dummy_derive/src/lib.rs @@ -234,7 +234,7 @@ fn expose_field(f: &DummyField) -> proc_macro2::TokenStream { if let Some(ref from) = f.from { let from_ty = syn::parse_str::(from).unwrap(); quote! { - std::convert::Into::<#field_ty>::into(::fake::Fake::fake_with_rng::<#from_ty, _>(&(#faker), rng)) + ::std::convert::Into::<#field_ty>::into(::fake::Fake::fake_with_rng::<#from_ty, _>(&(#faker), rng)) } } else if let Some(ref wrapper) = f.wrapper { let wrapper_ty = syn::parse_str::(wrapper).unwrap(); diff --git a/fake/src/lib.rs b/fake/src/lib.rs index 9548a2a..9625d6d 100644 --- a/fake/src/lib.rs +++ b/fake/src/lib.rs @@ -82,9 +82,9 @@ //! # } //! ``` #[doc(hidden)] -pub use rand::Rng; -#[doc(hidden)] pub use rand; +#[doc(hidden)] +pub use rand::Rng; /// Generate default fake value for given type using [`Fake`]. ///