Skip to content

Commit 4cd0f17

Browse files
author
B I Mohammed Abbas
committed
Allow unused unsafe on write at and read at in unix fd
1 parent e317f10 commit 4cd0f17

File tree

1 file changed

+2
-0
lines changed
  • library/std/src/sys/pal/unix

1 file changed

+2
-0
lines changed

library/std/src/sys/pal/unix/fd.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ impl FileDesc {
120120
(&mut me).read_to_end(buf)
121121
}
122122

123+
#[allow(unused_unsafe)]
123124
pub fn read_at(&self, buf: &mut [u8], offset: u64) -> io::Result<usize> {
124125
#[cfg(not(any(
125126
all(target_os = "linux", not(target_env = "musl")),
@@ -313,6 +314,7 @@ impl FileDesc {
313314
cfg!(not(any(target_os = "espidf", target_os = "horizon", target_os = "vita")))
314315
}
315316

317+
#[allow(unused_unsafe)]
316318
pub fn write_at(&self, buf: &[u8], offset: u64) -> io::Result<usize> {
317319
#[cfg(not(any(
318320
all(target_os = "linux", not(target_env = "musl")),

0 commit comments

Comments
 (0)