Fix getting view in inner_getters

This commit is contained in:
Tymoteusz Jankowski 2018-01-27 19:51:03 +01:00
parent 351fcdf559
commit 579b8fddd3

View File

@ -232,11 +232,11 @@ macro_rules! inner_getters {
(self.$v:ident: $t:ty) => { (self.$v:ident: $t:ty) => {
/// Gets access to the inner view. /// Gets access to the inner view.
pub fn get_inner(&self) -> &$t { pub fn get_inner(&self) -> &$t {
&self.view &self.$v
} }
/// Gets mutable access to the inner view. /// Gets mutable access to the inner view.
pub fn get_inner_mut(&mut self) -> &mut $t { pub fn get_inner_mut(&mut self) -> &mut $t {
&mut self.view &mut self.$v
} }
} }
} }