mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Remove syn 0.15 from our crate graph (fixes #24421)
This required bumps of: * gleam * image * rust-webvr * webrender * webxr
This commit is contained in:
parent
756cf66cd2
commit
9996e48500
61 changed files with 219 additions and 187 deletions
|
@ -77,15 +77,15 @@ pub fn load_from_memory(buffer: &[u8], cors_status: CorsStatus) -> Option<Image>
|
|||
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img
|
||||
pub fn detect_image_format(buffer: &[u8]) -> Result<ImageFormat, &str> {
|
||||
if is_gif(buffer) {
|
||||
Ok(ImageFormat::GIF)
|
||||
Ok(ImageFormat::Gif)
|
||||
} else if is_jpeg(buffer) {
|
||||
Ok(ImageFormat::JPEG)
|
||||
Ok(ImageFormat::Jpeg)
|
||||
} else if is_png(buffer) {
|
||||
Ok(ImageFormat::PNG)
|
||||
Ok(ImageFormat::Png)
|
||||
} else if is_bmp(buffer) {
|
||||
Ok(ImageFormat::BMP)
|
||||
Ok(ImageFormat::Bmp)
|
||||
} else if is_ico(buffer) {
|
||||
Ok(ImageFormat::ICO)
|
||||
Ok(ImageFormat::Ico)
|
||||
} else {
|
||||
Err("Image Format Not Supported")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue