From 73f627ceba3a2b458a2b3a84aad04f22e4c30280 Mon Sep 17 00:00:00 2001 From: Carter Green Date: Tue, 24 Sep 2024 09:44:12 -0500 Subject: [PATCH] MOD: Deprecate `Tar` packaging option --- CHANGELOG.md | 6 ++++++ src/historical/batch.rs | 3 +++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82ed387..c400ee8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 0.13.0 - TBD + +#### Deprecations +- Deprecated `Packaging::Tar`. Users should switch to `Packaging::Zip`. This variant + will be removed in a future version when it is no longer supported by the API + ## 0.12.1 - 2024-08-27 #### Enhancements diff --git a/src/historical/batch.rs b/src/historical/batch.rs index 0dd26a7..268d300 100644 --- a/src/historical/batch.rs +++ b/src/historical/batch.rs @@ -213,6 +213,7 @@ pub enum Packaging { /// ZIP compressed. Zip, /// Tarball. + #[deprecated(since = "0.13.0", note = "Users should use Zip instead")] Tar, } @@ -475,6 +476,7 @@ impl Packaging { pub const fn as_str(&self) -> &'static str { match self { Packaging::Zip => "zip", + #[allow(deprecated)] Packaging::Tar => "tar", } } @@ -492,6 +494,7 @@ impl FromStr for Packaging { fn from_str(s: &str) -> Result { match s { "zip" => Ok(Packaging::Zip), + #[allow(deprecated)] "tar" => Ok(Packaging::Tar), _ => Err(crate::Error::bad_arg( "s",