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

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


The following commit(s) were added to refs/heads/master by this push:
     new 8be32391b AVRO-3855: [Rust] Fix clippy error with Rust 1.65.0 (#2494)
8be32391b is described below

commit 8be32391bdeeb83e85737f87361da95996c52f38
Author: Kousuke Saruta <[email protected]>
AuthorDate: Thu Sep 14 15:01:59 2023 +0900

    AVRO-3855: [Rust] Fix clippy error with Rust 1.65.0 (#2494)
---
 .github/workflows/test-lang-rust-clippy.yml | 3 ++-
 lang/rust/avro/src/schema.rs                | 2 --
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/test-lang-rust-clippy.yml 
b/.github/workflows/test-lang-rust-clippy.yml
index adb8efe96..13bf179aa 100644
--- a/.github/workflows/test-lang-rust-clippy.yml
+++ b/.github/workflows/test-lang-rust-clippy.yml
@@ -52,6 +52,7 @@ jobs:
       - uses: actions/checkout@v4
       - uses: dtolnay/rust-toolchain@nightly
         with:
-          toolchain: stable
+          rust-version: ${{ matrix.rust }}
+          toolchain: ${{ matrix.rust }}
           components: clippy
       - run: cargo clippy --all-features --all-targets -- -Dclippy::all 
-Dunused_imports
diff --git a/lang/rust/avro/src/schema.rs b/lang/rust/avro/src/schema.rs
index e811f91bd..f6d780e49 100644
--- a/lang/rust/avro/src/schema.rs
+++ b/lang/rust/avro/src/schema.rs
@@ -723,7 +723,6 @@ impl RecordField {
                 }
                 _ => {
                     let resolved = avro_value
-                        .to_owned()
                         .resolve_internal(field_schema, names, 
&field_schema.namespace(), &None)
                         .is_ok();
 
@@ -1635,7 +1634,6 @@ impl Parser {
 
         if let Some(ref value) = default {
             let resolved = types::Value::from(value.clone())
-                .to_owned()
                 .resolve_enum(&symbols, &Some(value.to_string()), &None)
                 .is_ok();
             if !resolved {

Reply via email to