Skip to content

Commit 0e26cec

Browse files
committed
Replace Ratio<u16> with Ratio<i32>
As per rust-num/num#76, Ratio no longer accepts unsigned types. Signed-off-by: Anders Kaseorg <[email protected]>
1 parent ef044ab commit 0e26cec

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/animation.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ impl Frames {
2222
#[derive(Clone)]
2323
pub struct Frame {
2424
/// Delay between the frames in s
25-
delay: Ratio<u16>,
25+
delay: Ratio<i32>,
2626
/// x offset
2727
left: u32,
2828
/// y offset
@@ -42,7 +42,7 @@ impl Frame {
4242
}
4343

4444
/// Contructs a new frame
45-
pub fn from_parts(buffer: RgbaImage, left: u32, top: u32, delay: Ratio<u16>) -> Frame {
45+
pub fn from_parts(buffer: RgbaImage, left: u32, top: u32, delay: Ratio<i32>) -> Frame {
4646
Frame {
4747
delay: delay,
4848
left: left,
@@ -52,7 +52,7 @@ impl Frame {
5252
}
5353

5454
/// Delay of this frame
55-
pub fn delay(&self) -> Ratio<u16> {
55+
pub fn delay(&self) -> Ratio<i32> {
5656
self.delay
5757
}
5858

src/gif/decoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ impl<R: Read> GIFDecoder<R> {
238238
image,
239239
image_left as u32,
240240
image_top as u32,
241-
Ratio::new(self.delay, 100)
241+
Ratio::new(self.delay as i32, 100)
242242
))
243243
} else {
244244
Err(ImageError::FormatError(

0 commit comments

Comments
 (0)