From a84a53f88526ddaff607ab2c0d70083998e28b9a Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Sun, 15 May 2022 23:30:37 -0400 Subject: [PATCH] cleanup --- Cargo.lock | 31 +++++++++++++++++++------------ src/math_app.rs | 1 - src/misc.rs | 5 ----- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e9ef61e..2487528 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -354,6 +354,12 @@ dependencies = [ "objc", ] +[[package]] +name = "color-hex" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecdffb913a326b6c642290a0d0ec8e8d6597291acdc07cc4c9cb4b3635d44cf9" + [[package]] name = "combine" version = "4.6.4" @@ -662,7 +668,7 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "eframe" version = "0.18.0" -source = "git+https://github.com/Titaniumtown/egui.git#63980778541f105b139e6db0095c10a0f2ce4ad1" +source = "git+https://github.com/Titaniumtown/egui.git#865fecd46ab376c3c09f631216b8a8c7b127d8a1" dependencies = [ "bytemuck", "egui", @@ -682,7 +688,7 @@ dependencies = [ [[package]] name = "egui" version = "0.18.1" -source = "git+https://github.com/Titaniumtown/egui.git#63980778541f105b139e6db0095c10a0f2ce4ad1" +source = "git+https://github.com/Titaniumtown/egui.git#865fecd46ab376c3c09f631216b8a8c7b127d8a1" dependencies = [ "ahash", "epaint", @@ -693,7 +699,7 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.18.0" -source = "git+https://github.com/Titaniumtown/egui.git#63980778541f105b139e6db0095c10a0f2ce4ad1" +source = "git+https://github.com/Titaniumtown/egui.git#865fecd46ab376c3c09f631216b8a8c7b127d8a1" dependencies = [ "arboard", "egui", @@ -706,7 +712,7 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.18.1" -source = "git+https://github.com/Titaniumtown/egui.git#63980778541f105b139e6db0095c10a0f2ce4ad1" +source = "git+https://github.com/Titaniumtown/egui.git#865fecd46ab376c3c09f631216b8a8c7b127d8a1" dependencies = [ "bytemuck", "egui", @@ -726,7 +732,7 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "emath" version = "0.18.0" -source = "git+https://github.com/Titaniumtown/egui.git#63980778541f105b139e6db0095c10a0f2ce4ad1" +source = "git+https://github.com/Titaniumtown/egui.git#865fecd46ab376c3c09f631216b8a8c7b127d8a1" dependencies = [ "bytemuck", "libm", @@ -736,12 +742,13 @@ dependencies = [ [[package]] name = "epaint" version = "0.18.1" -source = "git+https://github.com/Titaniumtown/egui.git#63980778541f105b139e6db0095c10a0f2ce4ad1" +source = "git+https://github.com/Titaniumtown/egui.git#865fecd46ab376c3c09f631216b8a8c7b127d8a1" dependencies = [ "ab_glyph", "ahash", "atomic_refcell", "bytemuck", + "color-hex", "emath", "libm", "nohash-hasher", @@ -1022,7 +1029,7 @@ dependencies = [ "ahash", "atty", "indexmap", - "itoa 1.0.1", + "itoa 1.0.2", "lazy_static", "log", "num-format", @@ -1066,9 +1073,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" [[package]] name = "jni" @@ -1931,9 +1938,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" [[package]] name = "same-file" @@ -1998,7 +2005,7 @@ version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" dependencies = [ - "itoa 1.0.1", + "itoa 1.0.2", "ryu", "serde", ] diff --git a/src/math_app.rs b/src/math_app.rs index c5405fa..bae4cb7 100644 --- a/src/math_app.rs +++ b/src/math_app.rs @@ -240,7 +240,6 @@ impl MathApp { debug_assert!(data_decompressed.is_empty()); unsafe { - assume(data_decompressed.len() > 0); assume(!data_decompressed.is_empty()); } diff --git a/src/misc.rs b/src/misc.rs index 438b531..f3aeb43 100644 --- a/src/misc.rs +++ b/src/misc.rs @@ -124,7 +124,6 @@ impl<'a> SteppedVector<'a> { #[inline] pub const fn get_min(&self) -> &f64 { unsafe { - assume(!self.data.is_empty()); assume(!self.data.is_empty()); self.data.get_unchecked(0) } @@ -133,7 +132,6 @@ impl<'a> SteppedVector<'a> { #[inline] pub const fn get_max(&self) -> &f64 { unsafe { - assume(!self.data.is_empty()); assume(!self.data.is_empty()); self.data.last().unwrap_unchecked() } @@ -210,7 +208,6 @@ pub fn newtons_method_helper( unsafe { assume(!data.is_empty()); - assume(!data.is_empty()); } data.iter() @@ -265,7 +262,6 @@ where unsafe { assume(!data.is_empty()); - assume(!data.is_empty()); } let max_i: i32 = (data.len() as i32) - 1; @@ -313,7 +309,6 @@ pub fn hashed_storage_create(hash: &[u8], data: &[u8]) -> String { debug_assert!(!data.is_empty()); unsafe { - assume(!data.is_empty()); assume(!data.is_empty()); assume(hash.len() == HASH_LENGTH); assume(!hash.is_empty());