You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(opentimstdf): eliminate panic surface in reader + py bindings (WP17)
- reader.rs: convert 2 `tdf_bin.lock().unwrap()` mutex calls to
`map_err(|_| Error::CorruptFrame(.., "tdf_bin mutex poisoned"))?`
so a poisoned guard surfaces as a structured error.
- reader.rs / codec.rs: replace `header[a..b].try_into().unwrap()` on
fixed-size header arrays with direct `[u8; 4]` literals;
`chunks_exact(4)` unwraps are kept under a localized
`#[allow(clippy::unwrap_used)]` with rationale (length guaranteed
by the iterator contract).
- mzml.rs: the two `self.spectra.as_ref().unwrap()` (populated
immediately above) become `.expect("populated above")` with a
localized lint allow.
- opentimstdf-py: convert all 11 `inner.lock().unwrap()` sites to
`.lock().map_err(|_| PyRuntimeError::new_err("reader lock
poisoned"))?`, surfacing the failure to Python as a RuntimeError.
- Gate `clippy::unwrap_used` / `expect_used` as warn in non-test
production code at both crate roots.
Refs: WP17 panic-surface sweep.
0 commit comments