1
Fork 0

core: convert vec::{last,last_opt} to return references

This commit is contained in:
Erick Tryzelaar 2013-03-05 19:39:18 -08:00
parent a18bf8c67d
commit 743cfce703
15 changed files with 74 additions and 51 deletions

View file

@ -759,7 +759,7 @@ pub fn Decoder(json: Json) -> Decoder {
priv impl Decoder {
fn peek(&self) -> &self/Json {
if self.stack.len() == 0 { self.stack.push(&self.json); }
vec::last(self.stack)
self.stack[self.stack.len() - 1]
}
fn pop(&self) -> &self/Json {