Skip to content

Commit 2cb363b

Browse files
committed
fix
Signed-off-by: Joe Isaacs <[email protected]>
1 parent e999661 commit 2cb363b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

vortex-io/src/file/object_store.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

44
use std::io;
5-
#[cfg(unix)]
6-
use std::os::unix::fs::FileExt;
75
#[cfg(not(unix))]
86
use std::io::{Read, Seek};
7+
#[cfg(unix)]
8+
use std::os::unix::fs::FileExt;
99
use std::sync::Arc;
1010

1111
use async_compat::Compat;
@@ -127,8 +127,9 @@ impl ReadSource for ObjectStoreIoSource {
127127
)
128128
.await?;
129129

130+
#[cfg_attr(unix, allow(unused_mut))]
130131
let buffer = match response.payload {
131-
object_store::GetResultPayload::File(file, _) => {
132+
object_store::GetResultPayload::File(mut file, _) => {
132133
// SAFETY: We're setting the length to the exact size we're about to read.
133134
// The read_exact_at call will either fill the entire buffer or return an error,
134135
// ensuring no uninitialized memory is exposed.

0 commit comments

Comments
 (0)