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

mgrigorov pushed a commit to branch remove-deprecated-items
in repository https://gitbox.apache.org/repos/asf/avro-rs.git

commit 6d5fcad76a37e14d503d584c37721cfd90c4b09b
Author: Martin Tzvetanov Grigorov <[email protected]>
AuthorDate: Mon Jul 21 09:10:49 2025 +0300

    chore: Remove deprecated items in 0.11.0 and 0.15.0
    
    Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
---
 avro/src/schema.rs | 24 +++++++-----------------
 avro/src/types.rs  | 26 ++++----------------------
 2 files changed, 11 insertions(+), 39 deletions(-)

diff --git a/avro/src/schema.rs b/avro/src/schema.rs
index 342b605..667195c 100644
--- a/avro/src/schema.rs
+++ b/avro/src/schema.rs
@@ -17,20 +17,20 @@
 
 //! Logic for parsing and interacting with schemas in Avro format.
 use crate::{
-    AvroResult,
     error::Error,
-    schema_equality, types,
-    util::MapHelper,
+    schema_equality,
+    types, util::MapHelper,
     validator::{
         validate_enum_symbol_name, validate_namespace, 
validate_record_field_name,
         validate_schema_name,
     },
+    AvroResult,
 };
 use digest::Digest;
 use log::{debug, error, warn};
 use serde::{
-    Deserialize, Serialize, Serializer,
-    ser::{SerializeMap, SerializeSeq},
+    ser::{SerializeMap, SerializeSeq}, Deserialize, Serialize,
+    Serializer,
 };
 use serde_json::{Map, Value};
 use std::{
@@ -934,16 +934,6 @@ impl UnionSchema {
         self.schemas.iter().any(|x| matches!(x, Schema::Null))
     }
 
-    /// Optionally returns a reference to the schema matched by this value, as 
well as its position
-    /// within this union.
-    #[deprecated(
-        since = "0.15.0",
-        note = "Please use `find_schema_with_known_schemata` instead"
-    )]
-    pub fn find_schema(&self, value: &types::Value) -> Option<(usize, 
&Schema)> {
-        self.find_schema_with_known_schemata::<Schema>(value, None, &None)
-    }
-
     /// Optionally returns a reference to the schema matched by this value, as 
well as its position
     /// within this union.
     ///
@@ -2643,10 +2633,10 @@ pub mod derive {
 #[cfg(test)]
 mod tests {
     use super::*;
-    use crate::{SpecificSingleObjectWriter, rabin::Rabin};
+    use crate::{rabin::Rabin, SpecificSingleObjectWriter};
     use apache_avro_test_helper::{
-        TestResult,
         logger::{assert_logged, assert_not_logged},
+        TestResult,
     };
     use serde_json::json;
     use serial_test::serial;
diff --git a/avro/src/types.rs b/avro/src/types.rs
index 2c5bdb0..611a975 100644
--- a/avro/src/types.rs
+++ b/avro/src/types.rs
@@ -17,14 +17,14 @@
 
 //! Logic handling the intermediate representation of Avro values.
 use crate::{
-    AvroResult, Error,
-    bigdecimal::{deserialize_big_decimal, serialize_big_decimal},
-    decimal::Decimal,
+    bigdecimal::{deserialize_big_decimal, serialize_big_decimal}, 
decimal::Decimal,
     duration::Duration,
     schema::{
         DecimalSchema, EnumSchema, FixedSchema, Name, Namespace, Precision, 
RecordField,
         RecordSchema, ResolvedSchema, Scale, Schema, SchemaKind, UnionSchema,
     },
+    AvroResult,
+    Error,
 };
 use bigdecimal::BigDecimal;
 use log::{debug, error};
@@ -126,24 +126,6 @@ pub enum Value {
     Uuid(Uuid),
 }
 
-/// Any structure implementing the [ToAvro](trait.ToAvro.html) trait will be 
usable
-/// from a [Writer](../writer/struct.Writer.html).
-#[deprecated(
-    since = "0.11.0",
-    note = "Please use Value::from, Into::into or value.into() instead"
-)]
-pub trait ToAvro {
-    /// Transforms this value into an Avro-compatible [Value](enum.Value.html).
-    fn avro(self) -> Value;
-}
-
-#[allow(deprecated)]
-impl<T: Into<Value>> ToAvro for T {
-    fn avro(self) -> Value {
-        self.into()
-    }
-}
-
 macro_rules! to_value(
     ($type:ty, $variant_constructor:expr) => (
         impl From<$type> for Value {
@@ -1187,8 +1169,8 @@ mod tests {
         schema::RecordFieldOrder,
     };
     use apache_avro_test_helper::{
-        TestResult,
         logger::{assert_logged, assert_not_logged},
+        TestResult,
     };
     use num_bigint::BigInt;
     use pretty_assertions::assert_eq;

Reply via email to