Update to rust master
This commit is contained in:
parent
31ee496621
commit
2557fc9ab9
|
@ -741,7 +741,7 @@ impl<'a> Parser<'a> {
|
||||||
}
|
}
|
||||||
match *into.get_mut(&key).unwrap() {
|
match *into.get_mut(&key).unwrap() {
|
||||||
Array(ref mut vec) => {
|
Array(ref mut vec) => {
|
||||||
match vec.as_slice().head() {
|
match vec.as_slice().first() {
|
||||||
Some(ref v) if !v.same_type(&value) => {
|
Some(ref v) if !v.same_type(&value) => {
|
||||||
self.errors.push(ParserError {
|
self.errors.push(ParserError {
|
||||||
lo: key_lo,
|
lo: key_lo,
|
||||||
|
|
|
@ -50,7 +50,7 @@ impl<'a, 'b> Printer<'a, 'b> {
|
||||||
match *v {
|
match *v {
|
||||||
Table(..) => continue,
|
Table(..) => continue,
|
||||||
Array(ref a) => {
|
Array(ref a) => {
|
||||||
match a.as_slice().head() {
|
match a.as_slice().first() {
|
||||||
Some(&Table(..)) => continue,
|
Some(&Table(..)) => continue,
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ impl<'a, 'b> Printer<'a, 'b> {
|
||||||
self.stack.pop();
|
self.stack.pop();
|
||||||
}
|
}
|
||||||
Array(ref inner) => {
|
Array(ref inner) => {
|
||||||
match inner.as_slice().head() {
|
match inner.as_slice().first() {
|
||||||
Some(&Table(..)) => {}
|
Some(&Table(..)) => {}
|
||||||
_ => continue
|
_ => continue
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ fn to_json(toml: Value) -> Json {
|
||||||
Boolean(b) => doit("bool", Json::String(b.to_string())),
|
Boolean(b) => doit("bool", Json::String(b.to_string())),
|
||||||
Datetime(s) => doit("datetime", Json::String(s)),
|
Datetime(s) => doit("datetime", Json::String(s)),
|
||||||
Array(arr) => {
|
Array(arr) => {
|
||||||
let is_table = match arr.as_slice().head() {
|
let is_table = match arr.as_slice().first() {
|
||||||
Some(&Table(..)) => true,
|
Some(&Table(..)) => true,
|
||||||
_ => false,
|
_ => false,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue