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 2022/11/18 09:59:41 UTC

[avro] branch avro-3674 created (now fbe9a76a1)

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

mgrigorov pushed a change to branch avro-3674
in repository https://gitbox.apache.org/repos/asf/avro.git


      at fbe9a76a1 AVRO-3674: Fix the build for Rust 1.54 (MSRV)

This branch includes the following new commits:

     new fbe9a76a1 AVRO-3674: Fix the build for Rust 1.54 (MSRV)

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] 01/01: AVRO-3674: Fix the build for Rust 1.54 (MSRV)

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

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

commit fbe9a76a1b4ece70702ef2a208e3abe97949c21c
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Fri Nov 18 11:54:50 2022 +0200

    AVRO-3674: Fix the build for Rust 1.54 (MSRV)
    
    Add support for all named schema types
    
    Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---
 lang/rust/avro/src/types.rs | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/lang/rust/avro/src/types.rs b/lang/rust/avro/src/types.rs
index c328f1d68..fadff4481 100644
--- a/lang/rust/avro/src/types.rs
+++ b/lang/rust/avro/src/types.rs
@@ -341,14 +341,9 @@ impl Value {
     pub fn validate(&self, schema: &Schema) -> bool {
         let rs = ResolvedSchema::try_from(schema).expect("Schema didn't successfully parse");
         let namespace = match schema {
-            Schema::Record {
-                name,
-                aliases: _,
-                doc: _,
-                fields: _,
-                lookup: _,
-                attributes: _,
-            } => &name.namespace,
+            Schema::Record { name, .. }
+            | Schema::Enum { name, .. }
+            | Schema::Fixed { name, .. } => &name.namespace,
             _ => &None,
         };
 
@@ -589,10 +584,10 @@ impl Value {
         match *schema {
             Schema::Ref { ref name } => {
                 if let Some(resolved) = names.get(name) {
-                    info!("Resolved {name:?}");
+                    info!("Resolved {:?}", name);
                     self.resolve_internal(resolved, names)
                 } else {
-                    info!("Failed to resolve schema {name:?}");
+                    error!("Failed to resolve schema {:?}", name);
                     Err(Error::SchemaResolutionError(name.clone()))
                 }
             }