fix: drop duplicate read_at left by the ms-trim and prefill-kernels merges
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
f907a1bfdf
commit
5e0bd84901
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user