fixup and line width changes

This commit is contained in:
Simon Gardling 2023-03-08 13:11:01 -05:00
parent d820be537e
commit b421159f81
3 changed files with 13 additions and 19 deletions

View File

@ -389,7 +389,7 @@ impl FunctionEntry {
self.back_data self.back_data
.clone() .clone()
.to_line() .to_line()
.stroke(egui::Stroke::new(2.0, main_plot_color)), .stroke(egui::Stroke::new(4.0, main_plot_color)),
); );
} }

View File

@ -193,16 +193,13 @@ impl MathApp {
fn decompress_data() -> crate::data::TotalData { fn decompress_data() -> crate::data::TotalData {
let mut data = Vec::new(); let mut data = Vec::new();
let _ = unsafe { let _ = ruzstd::StreamingDecoder::new(
ruzstd::StreamingDecoder::new( &mut const { include_bytes!(concat!(env!("OUT_DIR"), "/compressed_data")).as_slice() },
&mut const { )
include_bytes!(concat!(env!("OUT_DIR"), "/compressed_data")).as_slice() .expect("unable to decode compressed data")
}, .read_to_end(&mut data)
) .expect("unable to read compressed data");
.unwrap_unchecked()
.read_to_end(&mut data)
.unwrap_unchecked()
};
#[cfg(target = "wasm32")] #[cfg(target = "wasm32")]
{ {
debug_assert!(!data.is_empty()); debug_assert!(!data.is_empty());
@ -224,7 +221,7 @@ impl MathApp {
.expect("failed to set local storage cache"); .expect("failed to set local storage cache");
} }
unsafe { bincode::deserialize(data.as_slice()).unwrap_unchecked() } bincode::deserialize(data.as_slice()).expect("unable to deserialize bincode")
} }
#[cfg(target = "wasm32")] #[cfg(target = "wasm32")]

View File

@ -11,13 +11,10 @@ pub fn to_unicode_hash(c: char) -> String {
#[allow(dead_code)] #[allow(dead_code)]
pub fn to_chars_array(chars: Vec<char>) -> String { pub fn to_chars_array(chars: Vec<char>) -> String {
[ "[".to_string()
"[", + &chars
&chars
.iter() .iter()
.map(|c| format!("'{}'", c.escape_unicode())) .map(|c| format!("'{}'", c.escape_unicode()))
.join(", "), .join(", ")
"]", + "]"
]
.concat()
} }