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

mgrigorov pushed a commit to branch get-rid-of-anyhow
in repository https://gitbox.apache.org/repos/asf/avro-rs.git

commit a6568946552b9e4bd2c5b0cecfeb4bb2ad37b88f
Author: Martin Tzvetanov Grigorov <[email protected]>
AuthorDate: Fri Jan 23 13:30:35 2026 +0200

    chore: Get rid of anyhow as a dev-dependency
    
    Reason: Less dependencies, faster build.
---
 Cargo.lock                              | 7 -------
 avro/Cargo.toml                         | 1 -
 avro/examples/specific_single_object.rs | 2 +-
 avro/examples/to_value.rs               | 2 +-
 avro/src/duration.rs                    | 3 +--
 5 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index bb1202d..249241c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -47,17 +47,10 @@ version = "1.0.13"
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"
 
-[[package]]
-name = "anyhow"
-version = "1.0.100"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61"
-
 [[package]]
 name = "apache-avro"
 version = "0.22.0"
 dependencies = [
- "anyhow",
  "apache-avro-derive",
  "apache-avro-test-helper",
  "bigdecimal",
diff --git a/avro/Cargo.toml b/avro/Cargo.toml
index a71cc64..2cc9229 100644
--- a/avro/Cargo.toml
+++ b/avro/Cargo.toml
@@ -82,7 +82,6 @@ quad-rand = { default-features = false, version = "0.2.3" }
 rand = { default-features = false, version = "0.9.2", features = ["default"] }
 
 [dev-dependencies]
-anyhow = { default-features = false, version = "1.0.100", features = ["std"] }
 apache-avro-test-helper = { default-features = false, version = "0.22.0", path 
= "../avro_test_helper" }
 criterion = { default-features = false, version = "0.8.1" }
 hex-literal = { default-features = false, version = "1.1.0" }
diff --git a/avro/examples/specific_single_object.rs 
b/avro/examples/specific_single_object.rs
index 15ab480..1ade06f 100644
--- a/avro/examples/specific_single_object.rs
+++ b/avro/examples/specific_single_object.rs
@@ -24,7 +24,7 @@ struct Test {
     b: String,
 }
 
-fn main() -> anyhow::Result<()> {
+fn main() -> Result<(), Box<dyn std::error::Error>> {
     let mut buffer: Vec<u8> = Vec::new();
     let test = Test {
         a: 27,
diff --git a/avro/examples/to_value.rs b/avro/examples/to_value.rs
index 4a78383..e4e38b4 100644
--- a/avro/examples/to_value.rs
+++ b/avro/examples/to_value.rs
@@ -21,7 +21,7 @@ struct Test {
     b: &'static str,
 }
 
-fn main() -> anyhow::Result<()> {
+fn main() -> Result<(), Box<dyn std::error::Error>> {
     let test = Test { a: 27, b: "foo" };
     let value = apache_avro::to_value(test)?;
     println!("{value:?}");
diff --git a/avro/src/duration.rs b/avro/src/duration.rs
index c229171..cf24bc0 100644
--- a/avro/src/duration.rs
+++ b/avro/src/duration.rs
@@ -207,7 +207,6 @@ impl<'de> Deserialize<'de> for Duration {
 mod tests {
     use super::*;
     use crate::types::Value;
-    use anyhow::anyhow;
     use apache_avro_test_helper::TestResult;
 
     #[test]
@@ -230,7 +229,7 @@ mod tests {
                 assert_eq!(b, vec![7, 0, 0, 0, 4, 0, 0, 0, 45, 0, 0, 0]);
             }
             _ => {
-                Err(anyhow!("Expected a Bytes value but got {ser_val:?}"))?;
+                Err(format!("Expected a Bytes value but got {ser_val:?}"))?;
             }
         }
         Ok(())

Reply via email to