Skip to content

Commit

Permalink
Merge pull request #331 from EmbarkStudios/main
Browse files Browse the repository at this point in the history
Ignore clippy lint in generated code
  • Loading branch information
KodrAus committed Apr 5, 2023
2 parents 98b85d5 + 8ce0072 commit db4ce36
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/external/serde_support.rs
Expand Up @@ -39,7 +39,7 @@ where
{
type Value = T;

fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
formatter.write_str("a string value of `|` separated flags")
}

Expand Down
5 changes: 3 additions & 2 deletions src/internal.rs
Expand Up @@ -60,7 +60,7 @@ macro_rules! __impl_internal_bitflags {
}

impl $crate::__private::core::fmt::Debug for $InternalBitFlags {
fn fmt(&self, f: &mut $crate::__private::core::fmt::Formatter) -> $crate::__private::core::fmt::Result {
fn fmt(&self, f: &mut $crate::__private::core::fmt::Formatter<'_>) -> $crate::__private::core::fmt::Result {
if self.is_empty() {
// If no flags are set then write an empty hex flag to avoid
// writing an empty string. In some contexts, like serialization,
Expand All @@ -78,7 +78,7 @@ macro_rules! __impl_internal_bitflags {
}

impl $crate::__private::core::fmt::Display for $InternalBitFlags {
fn fmt(&self, f: &mut $crate::__private::core::fmt::Formatter) -> $crate::__private::core::fmt::Result {
fn fmt(&self, f: &mut $crate::__private::core::fmt::Formatter<'_>) -> $crate::__private::core::fmt::Result {
// A formatter for bitflags that produces text output like:
//
// A | B | 0xf6
Expand Down Expand Up @@ -407,6 +407,7 @@ macro_rules! __impl_internal_bitflags {
if self.state.is_empty() || NUM_FLAGS == 0 {
$crate::__private::core::option::Option::None
} else {
#[allow(clippy::indexing_slicing)]
for (flag, flag_name) in OPTIONS[self.idx..NUM_FLAGS].iter().copied()
.zip(OPTIONS_NAMES[self.idx..NUM_FLAGS].iter().copied())
{
Expand Down
2 changes: 1 addition & 1 deletion src/parser.rs
Expand Up @@ -88,7 +88,7 @@ impl ParseError {
}

impl fmt::Display for ParseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match &self.0 {
ParseErrorKind::InvalidNamedFlag { got } => {
let _got = got;
Expand Down

0 comments on commit db4ce36

Please sign in to comment.