Use $crate
dtolnay opened this issue · comments
The current macro requires the user to have a dependency on serde and have imported serde::{Deserialize, Deserializer, de, Serializer}
. A better way would be to have #[doc(hidden)] pub use serde::{/* ... */}
in this crate and then use $crate::Serializer
etc in the macro expansion.
Good to know there's a better way. I didn't want to cause problems for users who had already use
'd the types I needed.