Move the TryInto import into the inner scope

This commit is contained in:
Marcin Mielniczuk 2019-08-08 11:44:59 +02:00
parent 3cd9f3f6ab
commit 3adbf63b11
No known key found for this signature in database
GPG key ID: 2CF0CE66660B8CC9

View file

@ -1,6 +1,5 @@
use crate::os::unix::prelude::*;
use crate::convert::TryInto;
use crate::ffi::{CString, CStr, OsString, OsStr};
use crate::fmt;
use crate::io::{self, Error, ErrorKind, SeekFrom, IoSlice, IoSliceMut};
@ -556,6 +555,7 @@ impl File {
#[cfg(not(target_os = "android"))]
{
use crate::convert::TryInto;
let size: off64_t = size
.try_into()
.map_err(|e| io::Error::new(io::ErrorKind::InvalidInput, e))?;