Skip to content

Commit

Permalink
Added missing variant in GdalDataType::iter.
Browse files Browse the repository at this point in the history
  • Loading branch information
metasim authored and lnicola committed Jan 2, 2024
1 parent 9f1ee1a commit 481a0d9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/raster/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ impl GdalDataType {
use GdalDataType::*;
[
UInt8,
#[cfg(any(all(major_ge_3, minor_ge_7), major_ge_4))]
Int8,
UInt16,
Int16,
UInt32,
Expand Down Expand Up @@ -432,6 +434,11 @@ mod tests {
assert!(t.is_integer(), "{}", &name);
assert!(!t.is_floating(), "{}", &name);
}
#[cfg(any(all(major_ge_3, minor_ge_7), major_ge_4))]
GDT_Int8 => {
assert!(t.is_integer(), "{}", &name);
assert!(!t.is_floating(), "{}", &name);
}
#[cfg(all(major_ge_3, minor_ge_5))]
GDT_UInt64 | GDT_Int64 => {
assert!(t.is_integer(), "{}", &name);
Expand All @@ -452,6 +459,10 @@ mod tests {
GDT_UInt64 => {
assert!(!t.is_signed(), "{}", &name);
}
#[cfg(any(all(major_ge_3, minor_ge_7), major_ge_4))]
GDT_Int8 => {
assert!(t.is_signed(), "{}", &name);
}
GDT_Int16 | GDT_Int32 | GDT_Float32 | GDT_Float64 => {
assert!(t.is_signed(), "{}", &name);
}
Expand Down

0 comments on commit 481a0d9

Please sign in to comment.