Skip to content

Commit 0afe13c

Browse files
committed
Fix: H5Dget_num_chunks() is 1.10.5+
1 parent 222cac1 commit 0afe13c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/hl/dataset.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ use std::ops::Deref;
55
use num_integer::div_floor;
66

77
#[cfg(hdf5_1_10_5)]
8-
use hdf5_sys::h5d::H5Dget_chunk_info;
8+
use hdf5_sys::h5d::{H5Dget_chunk_info, H5Dget_num_chunks};
99
use hdf5_sys::{
1010
h5::HADDR_UNDEF,
1111
h5d::{
1212
H5D_fill_value_t, H5D_layout_t, H5Dcreate2, H5Dcreate_anon, H5Dget_create_plist,
13-
H5Dget_num_chunks, H5Dget_offset, H5Dset_extent, H5D_FILL_TIME_ALLOC,
13+
H5Dget_offset, H5Dset_extent, H5D_FILL_TIME_ALLOC,
1414
},
1515
h5p::{
1616
H5Pcreate, H5Pfill_value_defined, H5Pget_chunk, H5Pget_fill_value, H5Pget_layout,
@@ -105,6 +105,7 @@ impl Dataset {
105105
})
106106
}
107107

108+
#[cfg(hdf5_1_10_5)]
108109
/// Returns number of chunks if the dataset is chunked.
109110
pub fn num_chunks(&self) -> Option<usize> {
110111
if !self.is_chunked() {

0 commit comments

Comments
 (0)