This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/avro-rs.git


The following commit(s) were added to refs/heads/main by this push:
     new db553af  chore: Fix `cargo check` errors with 1.83.0 (stable) (#65)
db553af is described below

commit db553af34f814259f29b4c556fabae145d6eea1a
Author: Martin Grigorov <[email protected]>
AuthorDate: Mon Dec 2 09:51:04 2024 +0200

    chore: Fix `cargo check` errors with 1.83.0 (stable) (#65)
    
    Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
---
 avro/src/de.rs        | 4 ++--
 avro/src/reader.rs    | 4 ++--
 avro/src/ser.rs       | 6 +++---
 avro/src/types.rs     | 2 +-
 avro/src/validator.rs | 2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/avro/src/de.rs b/avro/src/de.rs
index a932075..cc590ea 100644
--- a/avro/src/de.rs
+++ b/avro/src/de.rs
@@ -230,7 +230,7 @@ impl<'de> de::VariantAccess<'de> for EnumDeserializer<'de> {
     }
 }
 
-impl<'a, 'de> de::Deserializer<'de> for &'a Deserializer<'de> {
+impl<'de> de::Deserializer<'de> for &Deserializer<'de> {
     type Error = Error;
 
     fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
@@ -1504,7 +1504,7 @@ mod tests {
             D: serde::Deserializer<'de>,
         {
             struct BytesVisitor;
-            impl<'de> serde::de::Visitor<'de> for BytesVisitor {
+            impl Visitor<'_> for BytesVisitor {
                 type Value = Bytes;
 
                 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> 
std::fmt::Result {
diff --git a/avro/src/reader.rs b/avro/src/reader.rs
index e0d7488..416d31f 100644
--- a/avro/src/reader.rs
+++ b/avro/src/reader.rs
@@ -306,7 +306,7 @@ fn read_codec(metadata: &HashMap<String, Value>) -> 
AvroResult<Codec> {
             Err(err) => Err(err),
         });
 
-    result.unwrap_or_else(|| Ok(Codec::Null))
+    result.unwrap_or(Ok(Codec::Null))
 }
 
 /// Main interface for reading Avro formatted values.
@@ -415,7 +415,7 @@ impl<'a, R: Read> Reader<'a, R> {
     }
 }
 
-impl<'a, R: Read> Iterator for Reader<'a, R> {
+impl<R: Read> Iterator for Reader<'_, R> {
     type Item = AvroResult<Value>;
 
     fn next(&mut self) -> Option<Self::Item> {
diff --git a/avro/src/ser.rs b/avro/src/ser.rs
index 32d496b..d497568 100644
--- a/avro/src/ser.rs
+++ b/avro/src/ser.rs
@@ -346,7 +346,7 @@ impl ser::SerializeTupleStruct for SeqSerializer {
     }
 }
 
-impl<'a> ser::SerializeSeq for SeqVariantSerializer<'a> {
+impl ser::SerializeSeq for SeqVariantSerializer<'_> {
     type Ok = Value;
     type Error = Error;
 
@@ -372,7 +372,7 @@ impl<'a> ser::SerializeSeq for SeqVariantSerializer<'a> {
     }
 }
 
-impl<'a> ser::SerializeTupleVariant for SeqVariantSerializer<'a> {
+impl ser::SerializeTupleVariant for SeqVariantSerializer<'_> {
     type Ok = Value;
     type Error = Error;
 
@@ -447,7 +447,7 @@ impl ser::SerializeStruct for StructSerializer {
     }
 }
 
-impl<'a> ser::SerializeStructVariant for StructVariantSerializer<'a> {
+impl ser::SerializeStructVariant for StructVariantSerializer<'_> {
     type Ok = Value;
     type Error = Error;
 
diff --git a/avro/src/types.rs b/avro/src/types.rs
index b4d61a9..8b8090d 100644
--- a/avro/src/types.rs
+++ b/avro/src/types.rs
@@ -231,7 +231,7 @@ pub struct Record<'a> {
     schema_lookup: &'a BTreeMap<String, usize>,
 }
 
-impl<'a> Record<'a> {
+impl Record<'_> {
     /// Create a `Record` given a `Schema`.
     ///
     /// If the `Schema` is not a `Schema::Record` variant, `None` will be 
returned.
diff --git a/avro/src/validator.rs b/avro/src/validator.rs
index a30af6b..f2e178b 100644
--- a/avro/src/validator.rs
+++ b/avro/src/validator.rs
@@ -102,7 +102,7 @@ impl SchemaNamespaceValidator for SpecificationValidator {
     fn validate(&self, ns: &str) -> AvroResult<()> {
         let regex = SchemaNamespaceValidator::regex(self);
         if !regex.is_match(ns) {
-            return Err(Error::InvalidNamespace(ns.to_string(), 
regex.as_str()));
+            Err(Error::InvalidNamespace(ns.to_string(), regex.as_str()))
         } else {
             Ok(())
         }

Reply via email to