From 7287f9809eeafa3c038c6a67dc642272bbb4e37f Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Tue, 16 Jul 2024 18:45:26 -0400 Subject: [PATCH] Revert "Update snafu (#5930)" This reverts commit 756b1fb26d1702f36f446faf9bb40a4869c3e840. --- object_store/Cargo.toml | 2 +- object_store/src/client/get.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/object_store/Cargo.toml b/object_store/Cargo.toml index 234c7746b33b..3f7b2c0b2be0 100644 --- a/object_store/Cargo.toml +++ b/object_store/Cargo.toml @@ -38,7 +38,7 @@ humantime = "2.1" itertools = "0.13.0" parking_lot = { version = "0.12" } percent-encoding = "2.1" -snafu = { version = "0.8", default-features = false, features = ["std", "rust_1_61"] } +snafu = "0.7" tracing = { version = "0.1" } url = "2.2" walkdir = "2" diff --git a/object_store/src/client/get.rs b/object_store/src/client/get.rs index 0fef5785c052..b45eaa143702 100644 --- a/object_store/src/client/get.rs +++ b/object_store/src/client/get.rs @@ -103,7 +103,7 @@ enum GetResultError { source: crate::client::header::Error, }, - #[snafu(transparent)] + #[snafu(context(false))] InvalidRangeRequest { source: crate::util::InvalidGetRange, }, @@ -386,7 +386,7 @@ mod tests { let err = get_result::(&path, Some(get_range.clone()), resp).unwrap_err(); assert_eq!( err.to_string(), - "Wanted range starting at 2, but object was only 2 bytes long" + "InvalidRangeRequest: Wanted range starting at 2, but object was only 2 bytes long" ); let resp = make_response(