diff options
author | Wiktor Kwapisiewicz <wiktor@metacode.biz> | 2022-06-09 09:27:03 +0200 |
---|---|---|
committer | Wiktor Kwapisiewicz <wiktor@metacode.biz> | 2022-06-09 12:47:15 +0200 |
commit | aea7ba1a94ace78b1011b202e9884abccdab4012 (patch) | |
tree | 30ba87e0d2161d9f683d06deb6caaa32dfd6ce22 /openpgp/src/types/mod.rs | |
parent | f4417de86b2824424d7a625d713117d8587e1869 (diff) |
openpgp: Deprecate DataFormat::MIME
- Deprecate the enum variant in preparation for v2 removal to let API
clients adjust their code as early as possible.
- Update NEWS.
- See #863.
Diffstat (limited to 'openpgp/src/types/mod.rs')
-rw-r--r-- | openpgp/src/types/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/openpgp/src/types/mod.rs b/openpgp/src/types/mod.rs index f3c80a4d..7e7c3032 100644 --- a/openpgp/src/types/mod.rs +++ b/openpgp/src/types/mod.rs @@ -1600,6 +1600,7 @@ pub enum DataFormat { /// This is defined in [Section 5.10 of RFC4880bis]. /// /// [Section 5.10 of RFC4880bis]: https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-05#section-5.10 + #[deprecated(since = "1.10.0", note = "Do not use as semantics are unclear")] MIME, /// Unknown format specifier. @@ -1626,6 +1627,7 @@ impl From<char> for DataFormat { 'b' => Binary, 't' => Text, 'u' => Unicode, + #[allow(deprecated)] 'm' => MIME, c => Unknown(c), } @@ -1645,6 +1647,7 @@ impl From<DataFormat> for char { Binary => 'b', Text => 't', Unicode => 'u', + #[allow(deprecated)] MIME => 'm', Unknown(c) => c, } @@ -1661,6 +1664,7 @@ impl fmt::Display for DataFormat { f.write_str("Text data"), Unicode => f.write_str("Text data (UTF-8)"), + #[allow(deprecated)] MIME => f.write_str("MIME message body part"), Unknown(c) => |