core: convert vec::{last,last_opt} to return references
This commit is contained in:
parent
a18bf8c67d
commit
743cfce703
15 changed files with 74 additions and 51 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue