From 99db603d636072c400d12fbee0b1eaac88157059 Mon Sep 17 00:00:00 2001 From: edef Date: Wed, 24 Dec 2014 06:51:46 +0100 Subject: [PATCH] Stack.top returns a mutable pointer, so it should take &mut self --- src/stack.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stack.rs b/src/stack.rs index a911214..01de813 100644 --- a/src/stack.rs +++ b/src/stack.rs @@ -51,7 +51,7 @@ impl Stack { } } - pub fn top(&self) -> *mut u8 { + pub fn top(&mut self) -> *mut u8 { unsafe { match *self { Stack::Native { .. } => ptr::null_mut(),