equal
deleted
inserted
replaced
226 } |
226 } |
227 } |
227 } |
228 |
228 |
229 fn load_sprite(path: &Path) -> Result<ThemeSprite, ThemeLoadError> { |
229 fn load_sprite(path: &Path) -> Result<ThemeSprite, ThemeLoadError> { |
230 let decoder = Decoder::new(BufReader::new(File::open(path)?)); |
230 let decoder = Decoder::new(BufReader::new(File::open(path)?)); |
231 let (info, mut reader) = decoder.read_info()?; |
231 let mut reader = decoder.read_info()?; |
232 |
232 let info = reader.info(); |
233 if info.color_type != ColorType::RGBA { |
233 |
|
234 if info.color_type != ColorType::Rgba { |
234 return Err(ThemeLoadError::Format(format!( |
235 return Err(ThemeLoadError::Format(format!( |
235 "Unexpected format: {:?}", |
236 "Unexpected format: {:?}", |
236 info.color_type |
237 info.color_type |
237 ))); |
238 ))); |
238 } |
239 } |