You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2024/12/02 07:43:51 UTC

(avro-rs) branch fix-build-rust-1.83.0 created (now 98beb03)

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

mgrigorov pushed a change to branch fix-build-rust-1.83.0
in repository https://gitbox.apache.org/repos/asf/avro-rs.git


      at 98beb03  Fix `cargo check` errors with 1.83.0 (stable)

This branch includes the following new commits:

     new 98beb03  Fix `cargo check` errors with 1.83.0 (stable)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(avro-rs) 01/01: Fix `cargo check` errors with 1.83.0 (stable)

Posted by mg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 98beb0392b3bc3ac39f0e3a0e0410b89fdb79411
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Mon Dec 2 09:43:19 2024 +0200

    Fix `cargo check` errors with 1.83.0 (stable)
    
    Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---
 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(())
         }