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 f9701965c NO-JIRA: [Rust] Fix Clippy errors from Rust 1.79.0 (#2959)
f9701965c is described below
commit f9701965c4e60138a31342cc158bc54571e3132e
Author: Martin Grigorov <[email protected]>
AuthorDate: Mon Jun 17 14:46:13 2024 +0300
NO-JIRA: [Rust] Fix Clippy errors from Rust 1.79.0 (#2959)
* NO-JIRA: [Rust] Fix Clippy errors from Rust 1.79.0
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
* Allow unknown_lints to be able to build with older Rust than 1.79.0
manual_unwrap_or_default is introduced in 1.79.0
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
---------
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
(cherry picked from commit 2c484c638cbad34fd1a683a7812564972af751f4)
---
lang/rust/avro/src/util.rs | 1 -
lang/rust/avro_derive/src/lib.rs | 4 ++++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/lang/rust/avro/src/util.rs b/lang/rust/avro/src/util.rs
index 7afcc926b..869ea1566 100644
--- a/lang/rust/avro/src/util.rs
+++ b/lang/rust/avro/src/util.rs
@@ -18,7 +18,6 @@
use crate::{schema::Documentation, AvroResult, Error};
use serde_json::{Map, Value};
use std::{
- i64,
io::Read,
sync::{
atomic::{AtomicBool, AtomicUsize, Ordering},
diff --git a/lang/rust/avro_derive/src/lib.rs b/lang/rust/avro_derive/src/lib.rs
index 8f0138823..2b47dddd4 100644
--- a/lang/rust/avro_derive/src/lib.rs
+++ b/lang/rust/avro_derive/src/lib.rs
@@ -15,6 +15,10 @@
// specific language governing permissions and limitations
// under the License.
+// for Rust versions older than 1.79.0
+#![allow(unknown_lints)]
+// Allow until https://github.com/TedDriggs/darling/pull/292 is resolved
+#![allow(clippy::manual_unwrap_or_default)]
use darling::FromAttributes;
use proc_macro2::{Span, TokenStream};
use quote::quote;