From 7338e2c81f4bf223ac7fd2c5648b72564a09acc0 Mon Sep 17 00:00:00 2001 From: yggverse Date: Sat, 15 Feb 2025 20:04:04 +0200 Subject: [PATCH] add comments --- src/app/browser/window/tab/item/action/history/memory.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/browser/window/tab/item/action/history/memory.rs b/src/app/browser/window/tab/item/action/history/memory.rs index ff76ab7a..0fc54f0e 100644 --- a/src/app/browser/window/tab/item/action/history/memory.rs +++ b/src/app/browser/window/tab/item/action/history/memory.rs @@ -51,6 +51,8 @@ impl Memory { } } + /// Get previous history record + /// * change `cursor` position if `follow_to_index` match `true` pub fn back(&self, follow_to_index: bool) -> Option { let index = self.index.borrow(); let len = index.len(); @@ -65,6 +67,8 @@ impl Memory { } } + /// Get next history record + /// * change `cursor` position if `follow_to_index` match `true` pub fn next(&self, follow_to_index: bool) -> Option { let index = self.index.borrow(); let len = index.len();