mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Stop using unstable slice_patterns feature
This commit is contained in:
parent
e92a79619e
commit
10478b4fa3
5 changed files with 5 additions and 10 deletions
|
@ -108,10 +108,7 @@ pub fn detect_image_format(buffer: &[u8]) -> Result<ImageFormat, &str> {
|
|||
}
|
||||
|
||||
fn is_gif(buffer: &[u8]) -> bool {
|
||||
match buffer {
|
||||
&[b'G', b'I', b'F', b'8', n, b'a', _..] if n == b'7' || n == b'9' => true,
|
||||
_ => false,
|
||||
}
|
||||
buffer.starts_with(b"GIF87a") || buffer.starts_with(b"GIF89a")
|
||||
}
|
||||
|
||||
fn is_jpeg(buffer: &[u8]) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue