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