Skip to content
This repository was archived by the owner on Jun 23, 2022. It is now read-only.

Commit bb000ce

Browse files
committed
Upgrade deps
1 parent 36de793 commit bb000ce

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ readme = "README.md"
1313

1414
[dependencies]
1515
plotters-backend = "0.3.*"
16-
gif = { version = "0.10.3", optional = true }
16+
gif = { version = "0.11.2", optional = true }
1717

1818
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.image]
19-
version = "0.23.9"
19+
version = "0.23.14"
2020
optional = true
2121
default-features = false
2222
features = ["jpeg", "png", "bmp"]

src/bitmap.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ pub enum BitMapBackendError {
2020
InvalidBuffer,
2121
/// Some IO error occurs while the bitmap maniuplation
2222
IOError(std::io::Error),
23+
#[cfg(all(feature = "gif", not(target_arch = "wasm32"), feature = "image"))]
24+
GifEncodingError(gif::EncodingError),
2325
#[cfg(all(not(target_arch = "wasm32"), feature = "image"))]
2426
/// Image encoding error
2527
ImageError(ImageError),
@@ -45,7 +47,7 @@ fn blend(prev: &mut u8, new: u8, a: u64) {
4547
#[cfg(all(feature = "gif", not(target_arch = "wasm32"), feature = "image"))]
4648
mod gif_support {
4749
use super::*;
48-
use gif::{Encoder as GifEncoder, Frame as GifFrame, Repeat, SetParameter};
50+
use gif::{Encoder as GifEncoder, Frame as GifFrame, Repeat};
4951
use std::fs::File;
5052

5153
pub(super) struct GifFile {
@@ -67,11 +69,11 @@ mod gif_support {
6769
dim.1 as u16,
6870
&[],
6971
)
70-
.map_err(BitMapBackendError::IOError)?;
72+
.map_err(BitMapBackendError::GifEncodingError)?;
7173

7274
encoder
73-
.set(Repeat::Infinite)
74-
.map_err(BitMapBackendError::IOError)?;
75+
.set_repeat(Repeat::Infinite)
76+
.map_err(BitMapBackendError::GifEncodingError)?;
7577

7678
Ok(Self {
7779
encoder,
@@ -89,7 +91,7 @@ mod gif_support {
8991

9092
self.encoder
9193
.write_frame(&frame)
92-
.map_err(BitMapBackendError::IOError)?;
94+
.map_err(BitMapBackendError::GifEncodingError)?;
9395

9496
Ok(())
9597
}

0 commit comments

Comments
 (0)