Skip to content

Commit 0fbc899

Browse files
Remove deprecated Format::Pcx (#2790)
1 parent b9aa04b commit 0fbc899

2 files changed

Lines changed: 1 addition & 19 deletions

File tree

‎src/io/format.rs‎

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@ pub enum ImageFormat {
5050

5151
/// An Image in QOI Format
5252
Qoi,
53-
54-
/// An Image in PCX Format
55-
#[cfg_attr(not(feature = "serde"), deprecated)]
56-
#[doc(hidden)]
57-
Pcx,
5853
}
5954

6055
impl ImageFormat {
@@ -212,8 +207,6 @@ impl ImageFormat {
212207
ImageFormat::Qoi => "image/x-qoi",
213208
// farbfeld's MIME type taken from https://www.wikidata.org/wiki/Q28206109
214209
ImageFormat::Farbfeld => "application/octet-stream",
215-
#[allow(deprecated)]
216-
ImageFormat::Pcx => "image/vnd.zbrush.pcx",
217210
}
218211
}
219212

@@ -237,8 +230,6 @@ impl ImageFormat {
237230
ImageFormat::Farbfeld => true,
238231
ImageFormat::Avif => true,
239232
ImageFormat::Qoi => true,
240-
#[allow(deprecated)]
241-
ImageFormat::Pcx => false,
242233
}
243234
}
244235

@@ -262,8 +253,6 @@ impl ImageFormat {
262253
ImageFormat::Hdr => true,
263254
ImageFormat::OpenExr => true,
264255
ImageFormat::Qoi => true,
265-
#[allow(deprecated)]
266-
ImageFormat::Pcx => false,
267256
}
268257
}
269258

@@ -295,8 +284,6 @@ impl ImageFormat {
295284
// According to: https://aomediacodec.github.io/av1-avif/#mime-registration
296285
ImageFormat::Avif => &["avif"],
297286
ImageFormat::Qoi => &["qoi"],
298-
#[allow(deprecated)]
299-
ImageFormat::Pcx => &["pcx"],
300287
}
301288
}
302289

@@ -322,8 +309,6 @@ impl ImageFormat {
322309
ImageFormat::Farbfeld => cfg!(feature = "ff"),
323310
ImageFormat::Avif => cfg!(feature = "avif"),
324311
ImageFormat::Qoi => cfg!(feature = "qoi"),
325-
#[allow(deprecated)]
326-
ImageFormat::Pcx => false,
327312
}
328313
}
329314

@@ -349,8 +334,6 @@ impl ImageFormat {
349334
ImageFormat::OpenExr => cfg!(feature = "exr"),
350335
ImageFormat::Qoi => cfg!(feature = "qoi"),
351336
ImageFormat::Hdr => cfg!(feature = "hdr"),
352-
#[allow(deprecated)]
353-
ImageFormat::Pcx => false,
354337
}
355338
}
356339

@@ -371,8 +354,6 @@ impl ImageFormat {
371354
ImageFormat::OpenExr,
372355
ImageFormat::Qoi,
373356
ImageFormat::Hdr,
374-
#[allow(deprecated)]
375-
ImageFormat::Pcx,
376357
]
377358
.iter()
378359
.copied()

‎src/io/free_functions.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ pub(crate) fn encoder_for_format<'a, W: Write + Seek>(
9090
ImageFormat::WebP => Box::new(webp::WebPEncoder::new_lossless(buffered_write)),
9191
#[cfg(feature = "hdr")]
9292
ImageFormat::Hdr => Box::new(hdr::HdrEncoder::new(buffered_write)),
93+
#[allow(unreachable_patterns)] // unreachable if all formats are enabled
9394
_ => {
9495
return Err(ImageError::Unsupported(
9596
UnsupportedError::from_format_and_kind(

0 commit comments

Comments
 (0)