Skip to content

Commit

Permalink
address more clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
cynecx committed Dec 7, 2024
1 parent 0c87530 commit d34a05f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions prost-types/src/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ impl<'de> CustomDeserialize<'de> for FieldMask {
{
fn convert_path(path: &str) -> Result<String, &'static str> {
let underscores_required =
path.chars().filter(|chr| matches!(chr, 'A'..='Z')).count();
path.chars().filter(|chr| chr.is_ascii_uppercase()).count();

let mut buf = String::with_capacity(path.len() + underscores_required);

Expand Down Expand Up @@ -279,7 +279,7 @@ impl<'de> CustomDeserialize<'de> for Struct {
{
struct Visitor<'c>(&'c DeserializerConfig);

impl<'c, 'de> _serde::de::Visitor<'de> for Visitor<'c> {
impl<'de> _serde::de::Visitor<'de> for Visitor<'_> {
type Value = Struct;

fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
Expand Down Expand Up @@ -353,7 +353,7 @@ impl<'de> CustomDeserialize<'de> for Value {
{
struct Visitor<'c>(&'c DeserializerConfig);

impl<'c, 'de> _serde::de::Visitor<'de> for Visitor<'c> {
impl<'de> _serde::de::Visitor<'de> for Visitor<'_> {
type Value = Value;

fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
Expand Down Expand Up @@ -480,7 +480,7 @@ impl<'de> CustomDeserialize<'de> for ListValue {
{
struct Visitor<'c>(&'c DeserializerConfig);

impl<'c, 'de> _serde::de::Visitor<'de> for Visitor<'c> {
impl<'de> _serde::de::Visitor<'de> for Visitor<'_> {
type Value = ListValue;

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

0 comments on commit d34a05f

Please sign in to comment.