Skip to content

Commit ca28279

Browse files
authored
Fix build
1 parent 6d88cc7 commit ca28279

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/vanilla.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ impl VanillaExtractor {
114114
return Ok(());
115115
}
116116

117-
let result = std::fs::create_dir_all(path).or_else(|e| ParseError(format!("Failed to create directory structure: {}", e)))
117+
std::fs::create_dir_all(path).or_else(|e| Err(ParseError(format!("Failed to create directory structure: {}", e))))?;
118118

119119
Ok(())
120120
}
@@ -168,15 +168,15 @@ impl VanillaExtractor {
168168

169169
data_path.push(format!("{}.pbm", bitmap.name));
170170

171-
let mut file = std::fs::File::create(data_path).or_else(|e| ParseError(format!("Failed to create bitmap file: {}.", e)))?;
171+
let mut file = std::fs::File::create(data_path).or_else(|e| Err(ParseError(format!("Failed to create bitmap file: {}.", e))))?;
172172

173173
file.write_u8(0x42)?; // B
174174
file.write_u8(0x4D)?; // M
175175
file.write_u32::<LE>(bitmap.bytes.len() as u32 + 0xE)?; // Size of BMP file
176176
file.write_u32::<LE>(0)?; // unused null bytes
177177
file.write_u32::<LE>(0x76)?; // Bitmap data offset (hardcoded for now, might wanna get the actual offset)
178178

179-
let result = file.write_all(&bitmap.bytes).or_else(|e| ParseError(format!("Failed to write bitmap file: {}.", e)))?;
179+
let result = file.write_all(&bitmap.bytes).or_else(|e| Err(ParseError(format!("Failed to write bitmap file: {}.", e))))?;
180180

181181
println!("Extracted bitmap file: {}", bitmap.name);
182182
}

0 commit comments

Comments
 (0)