Skip to content

Commit

Permalink
Put internal Modifiers behind feature gate
Browse files Browse the repository at this point in the history
rustc started complaining in 1.57 that the fields were unused.
  • Loading branch information
jhpratt committed Dec 13, 2021
1 parent 09cb888 commit 1edf9fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/format_description/modifier.rs
Expand Up @@ -363,6 +363,7 @@ impl_const_default! {
}

/// The modifiers parsed for any given component. `None` indicates the modifier was not present.
#[cfg(feature = "alloc")]
#[allow(clippy::missing_docs_in_private_items)] // fields
#[derive(Debug, Default)]
pub(crate) struct Modifiers {
Expand All @@ -380,9 +381,9 @@ pub(crate) struct Modifiers {
pub(crate) case_sensitive: Option<bool>,
}

#[cfg(feature = "alloc")]
impl Modifiers {
/// Parse the modifiers of a given component.
#[cfg(feature = "alloc")]
#[allow(clippy::too_many_lines)]
pub(crate) fn parse(
component_name: &[u8],
Expand Down

0 comments on commit 1edf9fa

Please sign in to comment.