mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
draft bookmark toggle action
This commit is contained in:
parent
feca899c5b
commit
232f67b9cc
4 changed files with 49 additions and 5 deletions
|
|
@ -9,6 +9,7 @@ pub struct Memory {
|
|||
impl Memory {
|
||||
// Constructors
|
||||
|
||||
/// Create new `Self`
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
index: RefCell::new(HashMap::new()),
|
||||
|
|
@ -32,6 +33,7 @@ impl Memory {
|
|||
index.insert(request, time);
|
||||
}
|
||||
|
||||
/// Check request exist in memory index
|
||||
pub fn is_exist(&self, request: &str) -> bool {
|
||||
self.index.borrow().get(request).is_some()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue