diff options
| author | HampusM <hampus@hampusmat.com> | 2023-05-14 14:07:05 +0200 | 
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2023-05-14 14:07:05 +0200 | 
| commit | 530af717e7b7efda996fe28a24512d3d662d708e (patch) | |
| tree | b90fd8735b0d647c3209568fa2ba0fb7f6ade5c8 /src/deserializer | |
| parent | 9588367284139266b55936d93428355cfa6de906 (diff) | |
refactor: improve definition of MaybeStatic
Diffstat (limited to 'src/deserializer')
| -rw-r--r-- | src/deserializer/mod.rs | 20 | 
1 files changed, 4 insertions, 16 deletions
| 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<Infallible>>;  } -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.  /// | 
