This is an automated email from the ASF dual-hosted git repository. mgrigorov pushed a commit to branch fix-clippy-issues-for-rust-1.90.1 in repository https://gitbox.apache.org/repos/asf/avro-rs.git
commit eacb7f46dd436b361d45ce6b627271a867ea7fab Author: Martin Tzvetanov Grigorov <[email protected]> AuthorDate: Thu Oct 30 22:52:17 2025 +0200 chore: Fix clippy errors with Rust 1.90.1 Use an array instead of a Vec where possible Signed-off-by: Martin Tzvetanov Grigorov <[email protected]> --- avro/src/de.rs | 2 +- avro/src/schema.rs | 2 +- avro/tests/io.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/avro/src/de.rs b/avro/src/de.rs index 92a3b68..551b434 100644 --- a/avro/src/de.rs +++ b/avro/src/de.rs @@ -1050,7 +1050,7 @@ mod tests { Val4(u64), } - let data = vec![ + let data = [ ( TestNullExternalEnum { a: NullExternalEnum::Val1, diff --git a/avro/src/schema.rs b/avro/src/schema.rs index b8907e6..582e104 100644 --- a/avro/src/schema.rs +++ b/avro/src/schema.rs @@ -2565,7 +2565,7 @@ pub mod derive { let inner_schema = T::get_schema_in_ctxt(named_schemas, enclosing_namespace); Schema::Union(UnionSchema { schemas: vec![Schema::Null, inner_schema.clone()], - variant_index: vec![Schema::Null, inner_schema] + variant_index: [Schema::Null, inner_schema] .iter() .enumerate() .map(|(idx, s)| (SchemaKind::from(s), idx)) diff --git a/avro/tests/io.rs b/avro/tests/io.rs index ef7dc2d..5284426 100644 --- a/avro/tests/io.rs +++ b/avro/tests/io.rs @@ -264,7 +264,7 @@ fn test_schema_promotion() -> TestResult { // Each schema is present in order of promotion (int -> long, long -> float, float -> double) // Each value represents the expected decoded value when promoting a value previously encoded with a promotable schema let promotable_schemas = [r#""int""#, r#""long""#, r#""float""#, r#""double""#]; - let promotable_values = vec