|
| 1 | +// Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +// or more contributor license agreements. See the NOTICE file |
| 3 | +// distributed with this work for additional information |
| 4 | +// regarding copyright ownership. The ASF licenses this file |
| 5 | +// to you under the Apache License, Version 2.0 (the |
| 6 | +// "License"); you may not use this file except in compliance |
| 7 | +// with the License. You may obtain a copy of the License at |
| 8 | +// |
| 9 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +// |
| 11 | +// Unless required by applicable law or agreed to in writing, |
| 12 | +// software distributed under the License is distributed on an |
| 13 | +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +// KIND, either express or implied. See the License for the |
| 15 | +// specific language governing permissions and limitations |
| 16 | +// under the License. |
| 17 | + |
1 | 18 | use apache_avro::{AvroResult, Reader, Schema, Writer, from_value, types::Value}; |
2 | 19 | use serde::de::DeserializeOwned; |
3 | 20 | use serde::{Deserialize, Serialize}; |
|
19 | 36 | let read_avro_value = reader.next().unwrap()?; |
20 | 37 | assert_eq!( |
21 | 38 | &read_avro_value, test_case.expected_avro, |
22 | | - "serialization is not correct: expected: {:?}, got: {:?}, input: {:?}", |
23 | | - test_case.expected_avro, read_avro_value, test_case.input |
| 39 | + "serialization is not correct: expected: {:?}, got: {read_avro_value:?}, input: {:?}", |
| 40 | + test_case.expected_avro, test_case.input |
24 | 41 | ); |
25 | 42 | Ok(()) |
26 | 43 | } |
|
32 | 49 | let deserialized: T = from_value(test_case.expected_avro)?; |
33 | 50 | assert_eq!( |
34 | 51 | deserialized, test_case.input, |
35 | | - "deserialization is not correct: expected: {:?}, got: {:?}", |
36 | | - test_case.input, deserialized, |
| 52 | + "deserialization is not correct: expected: {:?}, got: {deserialized:?}", |
| 53 | + test_case.input, |
37 | 54 | ); |
38 | 55 | Ok(()) |
39 | 56 | } |
|
0 commit comments