From 5e0bd84901c22cbf9d00f50935f16c2cab495a88 Mon Sep 17 00:00:00 2001 From: Pavlo Ratushnyi Date: Sat, 17 Oct 2026 11:07:27 +0200 Subject: [PATCH] fix: drop duplicate read_at left by the ms-trim and prefill-kernels merges Co-Authored-By: Claude Sonnet 5.5 --- crates/model-format/src/kar.rs | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/crates/model-format/src/kar.rs b/crates/model-format/src/kar.rs index 8c85c12c..7b2d2058 100644 --- a/crates/model-format/src/kar.rs +++ b/crates/model-format/src/kar.rs @@ -1258,21 +1258,6 @@ fn read_at(file: &File, offset: u64, buffer: &mut [u8]) -> Result<(), KarError> Ok(()) } -/// Read exactly `buf.len()` bytes at absolute offset `at`: one `pread` on unix (the PLE row reader issues ~50 reads -/// per decoded token; a seek + read pair doubled the system calls and left the file offset moving). -fn read_at(file: &mut File, at: u64, buf: &mut [u8]) -> Result<(), KarError> { - #[cfg(unix)] - { - use std::os::unix::fs::FileExt; - file.read_exact_at(buf, at).map_err(KarError::Io) - } - #[cfg(not(unix))] - { - file.seek(SeekFrom::Start(at)).map_err(KarError::Io)?; - file.read_exact(buf).map_err(KarError::Io) - } -} - #[path = "kar_nested.rs"] mod nested; pub use nested::{KarNestedRecord, NESTING_TOPDOWN};