Skip to content

Commit 721d438

Browse files
enum Values now derives PartialEq.
1 parent aa74a75 commit 721d438

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/value.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use crate::endian::Endian;
3131
use crate::error::Error;
3232

3333
/// A type and values of a TIFF/Exif field.
34-
#[derive(Clone)]
34+
#[derive(Clone, PartialEq)]
3535
pub enum Value {
3636
/// Vector of 8-bit unsigned integers.
3737
Byte(Vec<u8>),
@@ -346,7 +346,7 @@ impl From<&DefaultValue> for Option<Value> {
346346
}
347347

348348
/// An unsigned rational number, which is a pair of 32-bit unsigned integers.
349-
#[derive(Copy, Clone)]
349+
#[derive(Copy, Clone, PartialEq)]
350350
pub struct Rational { pub num: u32, pub denom: u32 }
351351

352352
impl Rational {
@@ -384,7 +384,7 @@ impl fmt::Display for Rational {
384384
}
385385

386386
/// A signed rational number, which is a pair of 32-bit signed integers.
387-
#[derive(Copy, Clone)]
387+
#[derive(Copy, Clone, PartialEq)]
388388
pub struct SRational { pub num: i32, pub denom: i32 }
389389

390390
impl SRational {

0 commit comments

Comments
 (0)