mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-24 02:31:13 +08:00
fix: 修复全局边界安全与内存稳定性问题
This commit is contained in:
@@ -126,6 +126,14 @@ impl StringForge {
|
||||
inner.map = new_map;
|
||||
inner.entries = new_entries;
|
||||
}
|
||||
|
||||
pub fn len(&self) -> usize {
|
||||
self.inner.read().unwrap().entries.len()
|
||||
}
|
||||
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.len() == 0
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for StringForge {
|
||||
|
||||
Reference in New Issue
Block a user