Skip to content

Commit

Permalink
Stop using unstable slice_patterns feature
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrubeck committed May 1, 2017
1 parent e92a796 commit 10478b4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
5 changes: 1 addition & 4 deletions components/net_traits/image/base.rs
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion components/net_traits/lib.rs
Expand Up @@ -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)]
Expand Down
6 changes: 3 additions & 3 deletions components/script/dom/nodelist.rs
Expand Up @@ -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
},
Expand Down
1 change: 0 additions & 1 deletion components/script/lib.rs
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion components/script_plugins/lib.rs
Expand Up @@ -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;
Expand Down

0 comments on commit 10478b4

Please sign in to comment.