From 3590f43013a9ba6662dc6d3cc5669f8909629e18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82?= Date: Sat, 6 Oct 2018 17:16:15 +0200 Subject: [PATCH] Try to fix build without std and alloc (#18) --- src/table.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/table.rs b/src/table.rs index 7919f4c..0d34418 100644 --- a/src/table.rs +++ b/src/table.rs @@ -1,5 +1,4 @@ use io; -use io::{Error, ErrorKind}; use byteorder::LittleEndian; use byteorder_ext::{ReadBytesExt, WriteBytesExt}; @@ -305,9 +304,7 @@ impl FatTrait for Fat32 { // or even have them all store value '4' as their next cluster. // Some believe only FatValue::Bad should be allowed for this edge case. let tmp = if cluster == 0x0FFFFFF7 { "BAD_CLUSTER" } else { "end-of-chain" }; - let msg = format!("cluster number {} is a special value in FAT to indicate {}; it should never be set as free", cluster, tmp); - let custom_error = Error::new(ErrorKind::Other, msg); - return Err(custom_error); + panic!("cluster number {} is a special value in FAT to indicate {}; it should never be set as free", cluster, tmp); }; let raw_val = match value { FatValue::Free => 0,