Skip to content

Commit 33392e6

Browse files
1 parent e7f2b53 commit 33392e6

5 files changed

Lines changed: 11714 additions & 15439 deletions

File tree

Source/ApplicationState/State/FeatureState/NavigationHistory/NavigationHistoryState.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ impl NavigationHistoryState {
2929
/// Returns `true` if there is a previous location to navigate to.
3030
pub fn CanGoBack(&self) -> bool {
3131
let Stack = self.Stack.lock().ok().map(|G| G.len()).unwrap_or(0);
32-
let Index = self.Index.lock().ok().copied().unwrap_or(0);
32+
let Index = self.Index.lock().ok().as_deref().copied().unwrap_or(0);
3333

3434
Stack > 0 && Index > 0
3535
}
3636

3737
/// Returns `true` if there is a next location to navigate to.
3838
pub fn CanGoForward(&self) -> bool {
3939
let Stack = self.Stack.lock().ok().map(|G| G.len()).unwrap_or(0);
40-
let Index = self.Index.lock().ok().copied().unwrap_or(0);
40+
let Index = self.Index.lock().ok().as_deref().copied().unwrap_or(0);
4141

4242
Stack > 0 && Index + 1 < Stack
4343
}

0 commit comments

Comments
 (0)