cache empty FunctionEntry

This commit is contained in:
Simon Gardling
2022-03-08 09:10:10 -05:00
parent 07aa93046f
commit 9837f51382
3 changed files with 14 additions and 9 deletions

View File

@@ -22,6 +22,11 @@ impl fmt::Display for RiemannSum {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{:?}", self) }
}
lazy_static::lazy_static! {
pub static ref EMPTY_FUNCTIONENTRY: FunctionEntry = FunctionEntry::empty();
}
#[derive(Clone)]
pub struct FunctionEntry {
function: BackingFunction,
func_str: String,