Skip to content

Commit

Permalink
Don't use patch version
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrw committed Dec 31, 2024
1 parent ceb199a commit 76eb6b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fitsio-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ pub use sys::*;

/// Representation of the version of cfitsio used within bindings
pub struct CfitsioVersion {
/// Patch version
pub patch: u32,
/// Minor version
pub minor: u32,
/// Major version
Expand All @@ -113,13 +111,15 @@ pub struct CfitsioVersion {

impl std::fmt::Display for CfitsioVersion {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}.{}.{}", self.major, self.minor, self.patch)
write!(f, "{}.{}", self.major, self.minor)
}
}

pub fn cfitsio_version() -> CfitsioVersion {
CfitsioVersion {
patch: CFITSIO_MICRO,
// TODO: we need to detect the version of cfitsio we are binding to. Version >=4 supports
// this field, but earlier versions don't.
// patch: CFITSIO_MICRO,
minor: CFITSIO_MINOR,
major: CFITSIO_MAJOR,
}
Expand Down

0 comments on commit 76eb6b9

Please sign in to comment.