Skip to content

Commit

Permalink
fix clippy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rnag committed Jan 25, 2025
1 parent 5805570 commit 4ea42a5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/de_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ where
deserializer.deserialize_any(DeserializeStringWithVisitor)
}

/// TODO maybe update these definitions into a macro ..?
// TODO maybe update these definitions into a macro ..?

struct DeserializeU64WithVisitor;

impl<'de> de::Visitor<'de> for DeserializeU64WithVisitor {
impl de::Visitor<'_> for DeserializeU64WithVisitor {
type Value = u64;

fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down Expand Up @@ -162,7 +162,7 @@ impl<'de> de::Visitor<'de> for DeserializeU64WithVisitor {

struct DeserializeI64WithVisitor;

impl<'de> de::Visitor<'de> for DeserializeI64WithVisitor {
impl de::Visitor<'_> for DeserializeI64WithVisitor {
type Value = i64;

fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down Expand Up @@ -222,7 +222,7 @@ impl<'de> de::Visitor<'de> for DeserializeI64WithVisitor {

struct DeserializeF64WithVisitor;

impl<'de> de::Visitor<'de> for DeserializeF64WithVisitor {
impl de::Visitor<'_> for DeserializeF64WithVisitor {
type Value = f64;

fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down Expand Up @@ -275,7 +275,7 @@ impl<'de> de::Visitor<'de> for DeserializeF64WithVisitor {

struct DeserializeBoolWithVisitor;

impl<'de> de::Visitor<'de> for DeserializeBoolWithVisitor {
impl de::Visitor<'_> for DeserializeBoolWithVisitor {
type Value = bool;

fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down Expand Up @@ -361,7 +361,7 @@ impl<'de> de::Visitor<'de> for DeserializeBoolWithVisitor {

struct DeserializeStringWithVisitor;

impl<'de> de::Visitor<'de> for DeserializeStringWithVisitor {
impl de::Visitor<'_> for DeserializeStringWithVisitor {
type Value = String;

fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down
12 changes: 6 additions & 6 deletions src/de_impl_opt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ where
deserializer.deserialize_any(DeserializeOptionalStringWithVisitor)
}

/// TODO maybe update these definitions into a macro ..?
// TODO maybe update these definitions into a macro ..?

struct DeserializeOptionalU64WithVisitor;

impl<'de> de::Visitor<'de> for DeserializeOptionalU64WithVisitor {
impl de::Visitor<'_> for DeserializeOptionalU64WithVisitor {
type Value = Option<u64>;

fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down Expand Up @@ -206,7 +206,7 @@ impl<'de> de::Visitor<'de> for DeserializeOptionalU64WithVisitor {

struct DeserializeOptionalI64WithVisitor;

impl<'de> de::Visitor<'de> for DeserializeOptionalI64WithVisitor {
impl de::Visitor<'_> for DeserializeOptionalI64WithVisitor {
type Value = Option<i64>;

fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down Expand Up @@ -268,7 +268,7 @@ impl<'de> de::Visitor<'de> for DeserializeOptionalI64WithVisitor {

struct DeserializeOptionalF64WithVisitor;

impl<'de> de::Visitor<'de> for DeserializeOptionalF64WithVisitor {
impl de::Visitor<'_> for DeserializeOptionalF64WithVisitor {
type Value = Option<f64>;

fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down Expand Up @@ -322,7 +322,7 @@ impl<'de> de::Visitor<'de> for DeserializeOptionalF64WithVisitor {

struct DeserializeOptionalBoolWithVisitor;

impl<'de> de::Visitor<'de> for DeserializeOptionalBoolWithVisitor {
impl de::Visitor<'_> for DeserializeOptionalBoolWithVisitor {
type Value = Option<bool>;

fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down Expand Up @@ -405,7 +405,7 @@ impl<'de> de::Visitor<'de> for DeserializeOptionalBoolWithVisitor {

struct DeserializeOptionalStringWithVisitor;

impl<'de> de::Visitor<'de> for DeserializeOptionalStringWithVisitor {
impl de::Visitor<'_> for DeserializeOptionalStringWithVisitor {
type Value = Option<String>;

fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down

0 comments on commit 4ea42a5

Please sign in to comment.