From 530af717e7b7efda996fe28a24512d3d662d708e Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 14 May 2023 14:07:05 +0200 Subject: refactor: improve definition of MaybeStatic --- src/deserializer/mod.rs | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'src/deserializer/mod.rs') diff --git a/src/deserializer/mod.rs b/src/deserializer/mod.rs index 6a512dc..6d7d277 100644 --- a/src/deserializer/mod.rs +++ b/src/deserializer/mod.rs @@ -68,23 +68,11 @@ pub trait Deserializer fn skip_to_tag_end(&mut self, tag_name: &str) -> Result<(), Error>; } -macro_rules! maybe_static_doc { - () => { - "Bound to `'static` if the `deserializer-static-generics` feature is enabled." - }; -} - -#[cfg(any(not(feature = "deserializer-static-generics"), doc))] -trait_alias! { - #[doc = maybe_static_doc!()] - pub MaybeStatic; -} - -#[cfg(all(feature = "deserializer-static-generics", not(doc)))] -trait_alias! { - #[doc = maybe_static_doc!()] +trait_alias!( + bounds_when_feature = "deserializer-static-generics", + /// Bound to `'static` if the `deserializer-static-generics` feature is enabled. pub MaybeStatic: 'static; -} +); /// Whether or not to skip the end tag of a tagged element. /// -- cgit v1.2.3-18-g5258