(&mut self)
| 51 | } |
| 52 | |
| 53 | pub fn go_back(&mut self) -> bool { |
| 54 | if self.history.len() > 1 { |
| 55 | self.history.pop(); |
| 56 | if let Some(prev) = self.history.last() { |
| 57 | self.current = prev.clone(); |
| 58 | return true; |
| 59 | } |
| 60 | } |
| 61 | false |
| 62 | } |
| 63 | |
| 64 | pub fn is_home(&self) -> bool { |
| 65 | matches!(self.current, Route::Home) |