diff options
-rw-r--r-- | components/net_traits/image/base.rs | 5 | ||||
-rw-r--r-- | components/net_traits/lib.rs | 1 | ||||
-rw-r--r-- | components/script/dom/nodelist.rs | 6 | ||||
-rw-r--r-- | components/script/lib.rs | 1 | ||||
-rw-r--r-- | components/script_plugins/lib.rs | 2 |
5 files changed, 5 insertions, 10 deletions
diff --git a/components/net_traits/image/base.rs b/components/net_traits/image/base.rs index a6bc08ce22f..cae3cce8dde 100644 --- a/components/net_traits/image/base.rs +++ b/components/net_traits/image/base.rs @@ -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 { diff --git a/components/net_traits/lib.rs b/components/net_traits/lib.rs index 7f6df9eb9ff..cbe8e2aad42 100644 --- a/components/net_traits/lib.rs +++ b/components/net_traits/lib.rs @@ -3,7 +3,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #![feature(box_syntax)] -#![feature(slice_patterns)] #![feature(step_by)] #![deny(unsafe_code)] diff --git a/components/script/dom/nodelist.rs b/components/script/dom/nodelist.rs index 5c0983ccaa3..fae181f7d81 100644 --- a/components/script/dom/nodelist.rs +++ b/components/script/dom/nodelist.rs @@ -223,9 +223,9 @@ impl ChildrenList { // by ChildrenMutation::replace(). unreachable!() }, - (_, &[node, ..], _) => node, - (_, &[], Some(next)) => next, - (Some(prev), &[], None) => { + (_, added, _) if !added.is_empty() => added[0], + (_, _, Some(next)) => next, + (Some(prev), _, None) => { list.last_index.set(index - 1u32); prev }, diff --git a/components/script/lib.rs b/components/script/lib.rs index 57e7133638f..678603ee60f 100644 --- a/components/script/lib.rs +++ b/components/script/lib.rs @@ -12,7 +12,6 @@ #![feature(optin_builtin_traits)] #![feature(plugin)] #![feature(proc_macro)] -#![feature(slice_patterns)] #![feature(stmt_expr_attributes)] #![feature(try_from)] #![feature(untagged_unions)] diff --git a/components/script_plugins/lib.rs b/components/script_plugins/lib.rs index 3c0f67fa6ab..b35acdf3109 100644 --- a/components/script_plugins/lib.rs +++ b/components/script_plugins/lib.rs @@ -15,7 +15,7 @@ #![deny(unsafe_code)] -#![feature(box_syntax, plugin, plugin_registrar, rustc_private, slice_patterns)] +#![feature(box_syntax, plugin, plugin_registrar, rustc_private)] #[macro_use] extern crate rustc; |