Skip to content

Commit bd70cb0

Browse files
committed
feat: remove i32 and f32 header parsing
1 parent 18a98c6 commit bd70cb0

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
1212

1313
### Removed
1414

15+
* (`fitsio`) **BREAKING CHANGE** Removed the ability to read `i32` and `f32` header values. Instead, please use the `i64` and `f64` equivalents. This is because there is a bug in reading `i32` values in that they are read as "logical" i.e. 0 or 1. This led me to decide that we don't need to differentiate between `x32` and `x64` types for header values. See the [conversation here](https://github.com/mindriot101/rust-fitsio/issues/167) [#170](https://github.com/mindriot101/rust-fitsio/pull/170)
16+
1517
## [0.21.0]
1618
### Added
1719

1820
* The abillity to create a `FitsFile` struct from a `fitsio_sys::fitsfile` pointer [#195](https://github.com/simonrw/rust-fitsio/pull/195)
19-
* Support for boolean header card values
2021
* `fitsio-sys` (whichever feature is used) is exposed as `fitsio::sys` to make sure that only one crate that links to the system library exists [#195](https://github.com/simonrw/rust-fitsio/pull/174)
22+
* (`fitsio`) Support for boolean header card values
2123

2224
### Changed
2325

@@ -28,6 +30,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
2830
* Some more types are deriving `Eq` thanks to a clippy lint
2931
* Fixed broken tests on m1 macos [#174](https://github.com/simonrw/rust-fitsio/pull/174)
3032
* Minimum cfitsio version of 3.37 specified for compilation [#184](https://github.com/simonrw/rust-fitsio/pull/184)
33+
* Fixed broken tests on m1 macos [#174](https://github.com/mindriot101/rust-fitsio/pull/174)
34+
* (`fitsio`) Some more types are deriving `Eq` thanks to a clippy lint
35+
36+
### Removed
37+
3138

3239
## [0.20.0]
3340
### Added

fitsio/src/headers.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,18 @@ macro_rules! reads_key_impl {
5050
};
5151
}
5252

53-
reads_key_impl!(i32, fits_read_key_log);
5453
#[cfg(all(target_pointer_width = "64", not(target_os = "windows")))]
5554
reads_key_impl!(i64, fits_read_key_lng);
5655
#[cfg(any(target_pointer_width = "32", target_os = "windows"))]
5756
reads_key_impl!(i64, fits_read_key_lnglng);
58-
reads_key_impl!(f32, fits_read_key_flt);
5957
reads_key_impl!(f64, fits_read_key_dbl);
6058

6159
impl ReadsKey for bool {
6260
fn read_key(f: &mut FitsFile, name: &str) -> Result<Self>
6361
where
6462
Self: Sized,
6563
{
66-
let int_value = i32::read_key(f, name)?;
64+
let int_value = i64::read_key(f, name)?;
6765
Ok(int_value > 0)
6866
}
6967
}

0 commit comments

Comments
 (0)