Skip to content

Commit 326bea5

Browse files
committed
feat: display version number
1 parent 61d3261 commit 326bea5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/app.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use shortcut::Shortcuts;
1212
use std::{
1313
hash::{DefaultHasher, Hash, Hasher},
1414
path::PathBuf,
15-
sync::{Arc, Mutex},
15+
sync::{Arc, LazyLock, Mutex},
1616
};
1717

1818
mod data;
@@ -775,7 +775,9 @@ impl eframe::App for LogViewerApp {
775775

776776
egui::CentralPanel::default().show(ctx, |ui| {
777777
// The central panel the region left after adding TopPanel's and SidePanel's
778-
ui.heading("Log Viewer");
778+
static HEADING: LazyLock<&'static str> =
779+
LazyLock::new(|| format!("Log Viewer {}", env!("CARGO_PKG_VERSION")).leak());
780+
ui.heading(*HEADING);
779781
ui.separator();
780782
self.ui_loading(ui);
781783
ui.separator();

0 commit comments

Comments
 (0)