message: Progresses Adds __NonExhaustive to matches. Updates docs. Removes tests
diff: @@ -134,76 +134,46 @@ impl ImageFormat {
  }
  /// Return if the ImageFormat can be decoded by the lib.
  - ///
  - /// # Example
  - ///
  - /// ```
  - /// use image::ImageFormat;
  - /// #[cfg(feature = "png")]
  - /// assert_eq!(ImageFormat::Png.can_read(), true);
  - /// ```
  #[inline]
  pub fn can_read(&self) -> bool {
  // Needs to be updated once a new variant's decoder is added to free_functions.rs::load
  match self {
  - #[cfg(feature = "png")]
  ImageFormat::Png => true,
  - #[cfg(feature = "gif")]
  ImageFormat::Gif => true,
  - #[cfg(feature = "jpeg")]
  ImageFormat::Jpeg => true,
  - #[cfg(feature = "webp")]
  ImageFormat::WebP => true,
  - #[cfg(feature = "tiff")]
  ImageFormat::Tiff => true,
  - #[cfg(feature = "tga")]
  ImageFormat::Tga => true,
  - #[cfg(feature = "dds")]
  - ImageFormat::Dds => true,
  - #[cfg(feature = "bmp")]
  + ImageFormat::Dds => false,
  ImageFormat::Bmp => true,
  - #[cfg(feature = "ico")]
  ImageFormat::Ico => true,
  - #[cfg(feature = "hdr")]
  ImageFormat::Hdr => true,
  - #[cfg(feature = "pnm")]
  ImageFormat::Pnm => true,
  - #[cfg(feature = "farbfeld")]
  ImageFormat::Farbfeld => true,
  - _ => false,
  + ImageFormat::Avif => false,
  + ImageFormat::__NonExhaustive(marker) => match marker._private {},
  }
  }
  /// Return if the ImageFormat can be encoded by the lib.
  - ///
  - /// # Example
  - ///
  - /// ```
  - /// use image::ImageFormat;
  - /// #[cfg(feature = "png")]
  - /// assert_eq!(ImageFormat::Png.can_write(), true);
  - /// #[cfg(feature = "pnm")]
  - /// assert_eq!(ImageFormat::Pnm.can_write(), false);
  - /// ```
  #[inline]
  pub fn can_write(&self) -> bool {
  // Needs to be updated once a new variant's encoder is added to free_functions.rs::save_buffer_with_format_impl
  match self {
  - #[cfg(feature = "gif")]
  ImageFormat::Gif => true,
  - #[cfg(feature = "ico")]
  ImageFormat::Ico => true,
  - #[cfg(feature = "jpeg")]
  ImageFormat::Jpeg => true,
  - #[cfg(feature = "png")]
  ImageFormat::Png => true,
  - #[cfg(feature = "bmp")]
  ImageFormat::Bmp => true,
  - #[cfg(feature = "tiff")]
  ImageFormat::Tiff => true,
  - #[cfg(feature = "tga")]
  ImageFormat::Tga => true,
  - _ => false,
  + ImageFormat::Pnm => true,
  + ImageFormat::Farbfeld => true,
  + ImageFormat::Avif => true,
  + ImageFormat::WebP => false,
  + ImageFormat::Hdr => false,
  + ImageFormat::Dds => false,
  + ImageFormat::__NonExhaustive(marker) => match marker._private {},
  }
  }
  