From 131f047c91825434921c4c79ee88be0c5881ad02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Harabie=C5=84?= Date: Thu, 20 Dec 2018 02:42:49 +0100 Subject: [PATCH] Fix build on old Rustc --- src/fs.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fs.rs b/src/fs.rs index e9c7abe..c8dec2e 100644 --- a/src/fs.rs +++ b/src/fs.rs @@ -3,6 +3,7 @@ use alloc::String; use core::cell::{Cell, RefCell}; use core::char; use core::cmp; +use core::u32; use core::fmt::Debug; use core::iter::FromIterator; use io; @@ -927,7 +928,7 @@ pub fn format_volume(mut disk: T, options: FormatVolumeOptions let total_bytes: u64 = disk.seek(SeekFrom::End(0))?; let total_sectors_64 = total_bytes / u64::from(bytes_per_sector); disk.seek(SeekFrom::Start(0))?; - if total_sectors_64 > u64::from(core::u32::MAX) { + if total_sectors_64 > u64::from(u32::MAX) { return Err(Error::new(ErrorKind::Other, "Volume has too many sectors")); } total_sectors_64 as u32