Skip to content

Commit 1dff575

Browse files
authored
Merge pull request #268 from aldanor/feature/2024-jan-maintenance
Maintenance updates
2 parents 0299592 + 9e03b56 commit 1dff575

File tree

22 files changed

+59
-46
lines changed

22 files changed

+59
-46
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
schedule:
1111
- cron: '0 18 * * *'
1212

13+
concurrency:
14+
group: ${{ github.workflow }}-@{{ github.ref }}
15+
cancel-in-progress: true
16+
1317
env:
1418
CARGO_TERM_COLOR: always
1519

@@ -293,7 +297,7 @@ jobs:
293297
- name: Build and test
294298
env:
295299
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUNNER: wine64
296-
run: cargo test --features hdf5-sys/static --target x86_64-pc-windows-gnu -- --skip test_compile_fail
300+
run: cargo test --workspace --features hdf5-sys/static --target x86_64-pc-windows-gnu --exclude=hdf5-derive
297301

298302
addr_san:
299303
name: Address sanitizer

Cargo.toml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
[workspace]
2+
resolver = "2"
23
members = ["hdf5", "hdf5-types", "hdf5-derive", "hdf5-sys", "hdf5-src"]
34
default-members = ["hdf5", "hdf5-types", "hdf5-derive", "hdf5-sys"]
45

56
[workspace.package]
6-
version = "0.8.1" # !V
7+
version = "0.8.1" # !V
78
rust-version = "1.64.0"
8-
authors = ["Ivan Smirnov <[email protected]>", "Magnus Ulimoen <[email protected]>"]
9+
authors = [
10+
"Ivan Smirnov <[email protected]>",
11+
"Magnus Ulimoen <[email protected]>",
12+
]
913
keywords = ["hdf5"]
1014
license = "MIT OR Apache-2.0"
1115
repository = "https://github.com/aldanor/hdf5-rust"
@@ -20,9 +24,10 @@ libc = "0.2"
2024
libz-sys = { version = "1.1", default-features = false }
2125
mpi-sys = "0.2"
2226
num-complex = { version = "0.4", default-features = false }
23-
regex = "1.8"
27+
regex = "1.10"
2428
# internal
25-
hdf5-derive = { version = "0.8.1", path = "hdf5-derive" } # !V
26-
hdf5-src = { version = "0.8.1", path = "hdf5-src" } # !V
27-
hdf5-sys = { version = "0.8.1", path = "hdf5-sys" } # !V
28-
hdf5-types = { version = "0.8.1", path = "hdf5-types" } # !V
29+
hdf5 = { version = "0.8.1", path = "hdf5" } # !V
30+
hdf5-derive = { version = "0.8.1", path = "hdf5-derive" } # !V
31+
hdf5-src = { version = "0.8.1", path = "hdf5-src" } # !V
32+
hdf5-sys = { version = "0.8.1", path = "hdf5-sys" } # !V
33+
hdf5-types = { version = "0.8.1", path = "hdf5-types" } # !V

hdf5-derive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ syn = { version = "2.0", features = ["derive", "extra-traits"]}
2323

2424
[dev-dependencies]
2525
trybuild = "1.0"
26-
hdf5 = { version = ">=0.7.1", path = "../hdf5" }
26+
hdf5.workspace = true

hdf5-sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pkg-config = "0.3"
4040
[target.'cfg(windows)'.build-dependencies]
4141
serde = "1.0"
4242
serde_derive = "1.0"
43-
winreg = { version = "0.50", features = ["serialization-serde"]}
43+
winreg = { version = "0.52", features = ["serialization-serde"] }
4444

4545
[package.metadata.docs.rs]
4646
features = ["static", "zlib"]

hdf5-sys/src/h5p.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ mod globals {
132132

133133
#[cfg(feature = "1.12.0")]
134134
#[allow(clippy::module_inception)]
135-
pub mod globals {
135+
mod globals_1_12_0 {
136136
use super::*;
137137
extern_static!(H5P_MAP_CREATE, H5P_CLS_MAP_CREATE_ID_g);
138138
extern_static!(H5P_MAP_ACCESS, H5P_CLS_MAP_ACCESS_ID_g);
@@ -144,7 +144,7 @@ mod globals {
144144
extern_static!(H5P_REFERENCE_ACCESS_DEFAULT, H5P_LST_REFERENCE_ACCESS_ID_g);
145145
}
146146
#[cfg(feature = "1.12.0")]
147-
pub use globals::*;
147+
pub use globals_1_12_0::*;
148148
}
149149

150150
#[cfg(all(not(feature = "1.8.14"), all(target_env = "msvc", not(feature = "static"))))]

hdf5-sys/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ mod internal_prelude {
5858
pub use crate::h5i::hid_t;
5959
pub use crate::h5t::H5T_cset_t;
6060
pub use libc::{int64_t, off_t, size_t, ssize_t, time_t, uint32_t, uint64_t, FILE};
61+
#[allow(unused_imports)]
6162
pub use std::os::raw::{
6263
c_char, c_double, c_float, c_int, c_long, c_longlong, c_uchar, c_uint, c_ulong,
6364
c_ulonglong, c_void,

hdf5/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ f16 = ["hdf5-types/f16"]
3737

3838
[dependencies]
3939
# external
40-
bitflags = "2.3"
41-
blosc-sys = { version = "0.2", package = "blosc-src", optional = true }
40+
bitflags = "2.4"
41+
blosc-sys = { version = "0.3", package = "blosc-src", optional = true }
4242
cfg-if = { workspace = true }
4343
errno = { version = "0.3", optional = true }
4444
lazy_static = "1.4"
@@ -57,11 +57,11 @@ hdf5-types = { workspace = true }
5757
half = { workspace = true }
5858
num-complex = { workspace = true }
5959
paste = "1.0"
60-
pretty_assertions = "1.3"
60+
pretty_assertions = "1.4"
6161
rand = { version = "0.8", features = ["small_rng"] }
6262
regex = { workspace = true }
63-
scopeguard = "1.1"
64-
tempfile = "3.6"
63+
scopeguard = "1.2"
64+
tempfile = "3.9"
6565

6666
[package.metadata.docs.rs]
6767
features = ["static", "zlib", "blosc", "lzf", "f16", "complex"]

hdf5/src/class.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub trait ObjectClass: Sized {
2727
let handle = Handle::try_new(id)?;
2828
if Self::is_valid_id_type(handle.id_type()) {
2929
let obj = Self::from_handle(handle);
30-
obj.validate().map(|_| obj)
30+
obj.validate().map(|()| obj)
3131
} else {
3232
Err(From::from(format!("Invalid {} id: {}", Self::NAME, id)))
3333
}

hdf5/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ impl ExpandedErrorStack {
179179
}
180180

181181
pub fn top(&self) -> Option<&ErrorFrame> {
182-
self.get(0)
182+
self.first()
183183
}
184184

185185
pub fn description(&self) -> &str {

hdf5/src/hl/container.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ impl<'a> Reader<'a> {
130130
pub fn read_raw<T: H5Type>(&self) -> Result<Vec<T>> {
131131
let size = self.obj.space()?.size();
132132
let mut vec = Vec::with_capacity(size);
133-
self.read_into_buf(vec.as_mut_ptr(), None, None).map(|_| {
133+
self.read_into_buf(vec.as_mut_ptr(), None, None).map(|()| {
134134
unsafe {
135135
vec.set_len(size);
136136
};
@@ -184,7 +184,7 @@ impl<'a> Reader<'a> {
184184
let obj_ndim = self.obj.get_shape()?.ndim();
185185
ensure!(obj_ndim == 0, "ndim mismatch: expected scalar, got {}", obj_ndim);
186186
let mut val = mem::MaybeUninit::<T>::uninit();
187-
self.read_into_buf(val.as_mut_ptr(), None, None).map(|_| unsafe { val.assume_init() })
187+
self.read_into_buf(val.as_mut_ptr(), None, None).map(|()| unsafe { val.assume_init() })
188188
}
189189
}
190190

0 commit comments

Comments
 (0)