From 2932fea0dc45b20d0ff6998ef2c379f3f2d5802c Mon Sep 17 00:00:00 2001 From: Simon Walker Date: Sun, 10 Jul 2022 12:36:13 +0100 Subject: [PATCH] fix: reading boolean reads i64 So we don't have to perform a cast as well as the comparison. --- fitsio/src/headers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fitsio/src/headers.rs b/fitsio/src/headers.rs index 50b72d0d..60fd480b 100644 --- a/fitsio/src/headers.rs +++ b/fitsio/src/headers.rs @@ -75,7 +75,7 @@ impl ReadsKey for bool { where Self: Sized, { - let int_value = i32::read_key(f, name)?; + let int_value = i64::read_key(f, name)?; Ok(int_value > 0) } }