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

mgrigorov pushed a commit to branch avro-3905-fix-clippy-error-in-1.74.0
in repository https://gitbox.apache.org/repos/asf/avro.git

commit 9427353443fd41b07d1f9134702d8a0916c36c02
Author: Martin Tzvetanov Grigorov <[email protected]>
AuthorDate: Thu Nov 16 17:40:50 2023 +0200

    AVRO-3905: [Rust] Fix clippy error with Rust 1.74.0
    
    Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
---
 lang/rust/avro_derive/tests/derive.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lang/rust/avro_derive/tests/derive.rs 
b/lang/rust/avro_derive/tests/derive.rs
index 0bfc9a95c..89488b7e5 100644
--- a/lang/rust/avro_derive/tests/derive.rs
+++ b/lang/rust/avro_derive/tests/derive.rs
@@ -68,8 +68,8 @@ mod test_derive {
     {
         assert!(!encoded.is_empty());
         let schema = T::get_schema();
-        let reader = Reader::with_schema(&schema, &encoded[..]).unwrap();
-        for res in reader {
+        let mut reader = Reader::with_schema(&schema, &encoded[..]).unwrap();
+        if let Some(res) = reader.next() {
             match res {
                 Ok(value) => {
                     return from_value::<T>(&value).unwrap();

Reply via email to