From 86b008f07c97cf45ae678ced0a30fa08a80d2ce8 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Wed, 2 Mar 2022 17:52:21 -0500 Subject: [PATCH] some changes --- Cargo.toml | 5 ++--- src/egui_app.rs | 20 +++++++++----------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 087e36a..e484e80 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,15 +18,14 @@ strip = true [profile.dev] debug = true -codegen-units = 1 -opt-level = "s" #optimize for size +opt-level = 2 lto = false [dependencies] meval = { git = "https://github.com/Titaniumtown/meval-rs.git" } eframe = { git = "https://github.com/Titaniumtown/egui", default-features = false, features = ["egui_glow"] } include-flate = { git = "https://github.com/Titaniumtown/include-flate.git" } -shadow-rs = { version = "0.9.0", default-features = false } +shadow-rs = { version = "0.9", default-features = false } const_format = { version = "0.2.22", default-features = false, features = ["fmt"] } [build-dependencies] diff --git a/src/egui_app.rs b/src/egui_app.rs index 564f6f4..ed031fc 100644 --- a/src/egui_app.rs +++ b/src/egui_app.rs @@ -16,16 +16,14 @@ use std::ops::RangeInclusive; shadow!(build); // Constant function that has a string containing information about the build. -const fn build_info() -> &'static str { - formatc!( - "Commit: {} ({})\nBuild Date: {}\nRust Channel: {}\nRust Version: {}", - &build::SHORT_COMMIT, - &build::BRANCH, - &build::BUILD_TIME, - &build::RUST_CHANNEL, - &build::RUST_VERSION, - ) -} +const BUILD_INFO: &str = formatc!( + "Commit: {} ({})\nBuild Date: {}\nRust Channel: {}\nRust Version: {}", + &build::SHORT_COMMIT, + &build::BRANCH, + &build::BUILD_TIME, + &build::RUST_CHANNEL, + &build::RUST_VERSION, +); // Sets some hard-coded limits to the application const INTEGRAL_NUM_RANGE: RangeInclusive = 1..=100000; @@ -252,7 +250,7 @@ impl epi::App for MathApp { .resizable(false) .collapsible(false) .show(ctx, |ui| { - ui.label(build_info()); + ui.label(&*BUILD_INFO); }); // Side Panel which contains vital options to the operation of the application (such as adding functions and other options)