FunctionManager: create new()

This commit is contained in:
Simon Gardling 2025-12-05 11:56:46 -05:00
parent b59f214c67
commit 53d90b7328
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D

View File

@ -17,9 +17,7 @@ pub struct FunctionManager {
impl Default for FunctionManager { impl Default for FunctionManager {
fn default() -> Self { fn default() -> Self {
let mut d = Self { let mut d = Self::new();
functions: Vec::new()
};
d.push_empty(); d.push_empty();
d d
} }
@ -46,6 +44,12 @@ fn button_area_button<'a>(text: impl Into<WidgetText>) -> Button<'a> {
} }
impl FunctionManager { impl FunctionManager {
pub fn new() -> Self {
Self {
functions: Vec::new()
}
}
#[inline] #[inline]
fn get_hash(&self) -> u64 { fn get_hash(&self) -> u64 {
let mut hasher = DefaultHasher::new(); let mut hasher = DefaultHasher::new();