This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch branch-1.11
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/branch-1.11 by this push:
new c952aecdb AVRO-3855: [Rust] Fix clippy error with Rust 1.65.0 (#2494)
c952aecdb is described below
commit c952aecdb0801a2796d5ec9ddaefb89d9bf2ef20
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)
(cherry picked from commit 8be32391bdeeb83e85737f87361da95996c52f38)
---
.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 5a05885f9..e937bf5b1 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 {