diff --git a/src/profile/bookmark/memory.rs b/src/profile/bookmark/memory.rs index acaae71d..2111cb93 100644 --- a/src/profile/bookmark/memory.rs +++ b/src/profile/bookmark/memory.rs @@ -9,6 +9,12 @@ pub struct Memory { index: RefCell>, } +impl Default for Memory { + fn default() -> Self { + Self::new() + } +} + impl Memory { // Constructors @@ -56,7 +62,7 @@ impl Memory { } } - /// Get recent requests vector sorted DESC by `ID` + /// Get recent requests vector sorted by `ID` DESC pub fn recent(&self, limit: usize) -> Vec { let mut recent: Vec = Vec::new(); for (request, _) in self @@ -71,7 +77,7 @@ impl Memory { recent } - /// Get total records in memory pool + /// Get records total pub fn total(&self) -> usize { self.index.borrow().len() }