cleanup
This commit is contained in:
@@ -16,9 +16,11 @@ use std::{
|
||||
};
|
||||
|
||||
/// Represents the possible variations of Riemann Sums
|
||||
#[derive(PartialEq, Eq, Debug, Copy, Clone)]
|
||||
#[derive(PartialEq, Eq, Debug, Copy, Clone, Default)]
|
||||
pub enum Riemann {
|
||||
#[default]
|
||||
Left,
|
||||
|
||||
Middle,
|
||||
Right,
|
||||
}
|
||||
@@ -27,10 +29,6 @@ impl fmt::Display for Riemann {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{:?}", self) }
|
||||
}
|
||||
|
||||
impl const Default for Riemann {
|
||||
fn default() -> Riemann { Riemann::Left }
|
||||
}
|
||||
|
||||
/// `FunctionEntry` is a function that can calculate values, integrals, derivatives, etc etc
|
||||
#[derive(Clone)]
|
||||
pub struct FunctionEntry {
|
||||
|
||||
@@ -46,7 +46,7 @@ pub struct AppSettings {
|
||||
pub plot_width: usize,
|
||||
}
|
||||
|
||||
impl const Default for AppSettings {
|
||||
impl Default for AppSettings {
|
||||
/// Default implementation of `AppSettings`, this is how the application starts up
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
@@ -264,7 +264,7 @@ impl MathApp {
|
||||
|
||||
last_info: (None, None),
|
||||
opened: const { Opened::default() },
|
||||
settings: const { AppSettings::default() },
|
||||
settings: AppSettings::default(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,7 @@ pub fn to_unicode_hash(c: char) -> String {
|
||||
c.escape_unicode()
|
||||
.to_string()
|
||||
.replace(r#"\\u{"#, "")
|
||||
.replace('{', "")
|
||||
.replace('}', "")
|
||||
.replace(['{', '}'], "")
|
||||
.to_uppercase()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use crate::misc::Offset;
|
||||
use egui::{Id, InnerResponse};
|
||||
use std::hash::Hash;
|
||||
|
||||
/// Creates an area ontop of a widget with an y offset
|
||||
pub fn widgets_ontop<R>(
|
||||
|
||||
Reference in New Issue
Block a user