From 2557fc9ab98fd4ee4c894b05f1eda903773c4558 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 1 Jan 2015 08:48:47 -0800 Subject: Update to rust master --- src/parser.rs | 2 +- src/show.rs | 4 ++-- src/test/valid.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/parser.rs b/src/parser.rs index 00eafc3..f49435e 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -741,7 +741,7 @@ impl<'a> Parser<'a> { } match *into.get_mut(&key).unwrap() { Array(ref mut vec) => { - match vec.as_slice().head() { + match vec.as_slice().first() { Some(ref v) if !v.same_type(&value) => { self.errors.push(ParserError { lo: key_lo, diff --git a/src/show.rs b/src/show.rs index 487c62a..435da2d 100644 --- a/src/show.rs +++ b/src/show.rs @@ -50,7 +50,7 @@ impl<'a, 'b> Printer<'a, 'b> { match *v { Table(..) => continue, Array(ref a) => { - match a.as_slice().head() { + match a.as_slice().first() { Some(&Table(..)) => continue, _ => {} } @@ -69,7 +69,7 @@ impl<'a, 'b> Printer<'a, 'b> { self.stack.pop(); } Array(ref inner) => { - match inner.as_slice().head() { + match inner.as_slice().first() { Some(&Table(..)) => {} _ => continue } diff --git a/src/test/valid.rs b/src/test/valid.rs index 29fcda8..8f8b6bc 100644 --- a/src/test/valid.rs +++ b/src/test/valid.rs @@ -30,7 +30,7 @@ fn to_json(toml: Value) -> Json { Boolean(b) => doit("bool", Json::String(b.to_string())), Datetime(s) => doit("datetime", Json::String(s)), Array(arr) => { - let is_table = match arr.as_slice().head() { + let is_table = match arr.as_slice().first() { Some(&Table(..)) => true, _ => false, }; -- cgit v1.2.3