From 318f654fed5ac37cf0c5392c43599ae760e7334b Mon Sep 17 00:00:00 2001 From: MattJackson <1085847+MattJackson@users.noreply.github.com> Date: Thu, 7 May 2026 19:16:21 -0700 Subject: [PATCH] v0.17.3: fix scsi_recovery.rs Linux compile (missing Duration import) tests/scsi_recovery.rs: - Add `use std::time::Duration` inside both `#[cfg(target_os = "linux")]` blocks. Locally on macOS the linux blocks are cfg-out so the missing import was invisible to precommit on macOS. - Bug pre-dated this branch but only surfaced when v0.17.2 release CI ran the test compile on Linux. Cargo.toml: 0.17.2 -> 0.17.3. --- Cargo.toml | 2 +- tests/scsi_recovery.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7d6b5b2..e544490 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libfreemkv" -version = "0.17.2" +version = "0.17.3" edition = "2024" rust-version = "1.86" license = "AGPL-3.0-only" diff --git a/tests/scsi_recovery.rs b/tests/scsi_recovery.rs index f250e03..9dd789e 100644 --- a/tests/scsi_recovery.rs +++ b/tests/scsi_recovery.rs @@ -24,6 +24,7 @@ fn test_sgio_transport_timeout_does_not_kill_transport() { use libfreemkv::scsi::{DataDirection, SCSI_STATUS_TRANSPORT_FAILURE}; use std::sync::Arc; use std::sync::atomic::{AtomicI32, Ordering}; + use std::time::Duration; let mut transport = SgIoTransport::open(_path).expect("open device"); let fd_before = transport.fd; @@ -93,6 +94,8 @@ fn test_drive_read_per_cdb_timeout_bounds_call() { #[cfg(target_os = "linux")] { + use std::time::Duration; + let mut drive = libfreemkv::Drive::open(_path).expect("open drive"); let timeout_ms: u32 = 5_000;