Android: Fix unused-imports warning
This commit is contained in:
parent
94aa08b66c
commit
15549935f8
|
@ -31,7 +31,6 @@
|
|||
use libc::{c_int, c_void, sighandler_t, size_t, ssize_t};
|
||||
use libc::{ftruncate, pread, pwrite};
|
||||
|
||||
use convert::TryInto;
|
||||
use io;
|
||||
use super::{cvt, cvt_r};
|
||||
|
||||
|
@ -128,6 +127,7 @@ pub fn ftruncate64(fd: c_int, size: u64) -> io::Result<()> {
|
|||
pub unsafe fn cvt_pread64(fd: c_int, buf: *mut c_void, count: size_t, offset: i64)
|
||||
-> io::Result<ssize_t>
|
||||
{
|
||||
use convert::TryInto;
|
||||
weak!(fn pread64(c_int, *mut c_void, size_t, i64) -> ssize_t);
|
||||
pread64.get().map(|f| cvt(f(fd, buf, count, offset))).unwrap_or_else(|| {
|
||||
if let Ok(o) = offset.try_into() {
|
||||
|
@ -143,6 +143,7 @@ pub unsafe fn cvt_pread64(fd: c_int, buf: *mut c_void, count: size_t, offset: i6
|
|||
pub unsafe fn cvt_pwrite64(fd: c_int, buf: *const c_void, count: size_t, offset: i64)
|
||||
-> io::Result<ssize_t>
|
||||
{
|
||||
use convert::TryInto;
|
||||
weak!(fn pwrite64(c_int, *const c_void, size_t, i64) -> ssize_t);
|
||||
pwrite64.get().map(|f| cvt(f(fd, buf, count, offset))).unwrap_or_else(|| {
|
||||
if let Ok(o) = offset.try_into() {
|
||||
|
|
Loading…
Reference in New Issue