remove impl const

This commit is contained in:
2025-12-03 10:44:07 -05:00
parent 75092e7d9f
commit 53cb50316e
5 changed files with 31 additions and 15 deletions

View File

@@ -22,7 +22,9 @@ impl FlatExWrapper {
}
#[inline]
const fn is_none(&self) -> bool { self.func.is_none() }
const fn is_none(&self) -> bool {
self.func.is_none()
}
#[inline]
pub fn eval(&self, x: &[f64]) -> f64 {
@@ -66,8 +68,10 @@ impl FlatExWrapper {
}
}
impl const Default for FlatExWrapper {
fn default() -> FlatExWrapper { FlatExWrapper::EMPTY }
impl Default for FlatExWrapper {
fn default() -> FlatExWrapper {
FlatExWrapper::EMPTY
}
}
/// Function that includes f(x), f'(x), f'(x)'s string representation, and f''(x)
#[derive(Clone, PartialEq)]
@@ -80,11 +84,15 @@ pub struct BackingFunction {
}
impl Default for BackingFunction {
fn default() -> Self { Self::new("").unwrap() }
fn default() -> Self {
Self::new("").unwrap()
}
}
impl BackingFunction {
pub const fn is_none(&self) -> bool { self.function.is_none() }
pub const fn is_none(&self) -> bool {
self.function.is_none()
}
/// Create new [`BackingFunction`] instance
pub fn new(func_str: &str) -> Result<Self, String> {