Skip to content

Commit

Permalink
fixup! Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ModProg committed Aug 3, 2024
1 parent 0375b3f commit e925ce2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pub struct Data<'a> {
pub path: Path,
/// [Type](DataType) of this struct, union or variant.
pub type_: DataType<'a>,
#[cfg_attr(feature = "nightly", allow(unused))]
/// Discriminant of this variant.
pub discriminant: Option<&'a Expr>,
}
Expand Down
2 changes: 2 additions & 0 deletions src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use crate::{Data, Error, Incomparable, Trait};
pub enum Item<'a> {
/// Enum.
Enum {
#[cfg_attr(feature = "nightly", allow(unused))]
/// Type of discriminant used.
discriminant: Discriminant,
/// [`struct@Ident`] of this enum.
Expand Down Expand Up @@ -96,6 +97,7 @@ impl Item<'_> {
/// Type of discriminant used.
#[derive(Clone, Copy)]
#[cfg_attr(test, derive(Debug))]
#[cfg_attr(feature = "nightly", allow(unused))]
pub enum Discriminant {
/// The enum has only a single variant.
Single,
Expand Down

0 comments on commit e925ce2

Please sign in to comment.