Skip to content
This repository was archived by the owner on Mar 22, 2026. It is now read-only.

Commit f3c4466

Browse files
committed
updates
1 parent fe80eec commit f3c4466

6 files changed

Lines changed: 11 additions & 15 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ egui_extras = { version = "0.31", features = ["syntect", "image"] }
4747
image = "0.25"
4848
open = "5.3"
4949
parking_lot = "0.12"
50-
ureq = "3.0.6"
50+
ureq = "3.0.11"
5151

5252
[dev-dependencies]
5353
egui_kittest = { version = "0.31", features = ["wgpu", "snapshot"] }
5454
eframe = { version = "0.31", features = ["wgpu"] }
5555
tokio = { version = "1", features = ["time", "rt", "macros"] }
56-
wgpu = "24"
56+
wgpu = "25"
5757

5858
[lints.rust]
5959
unsafe_code = "deny"

src/tests/ui_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ async fn gpu_available() -> bool {
2121
force_fallback_adapter: false,
2222
})
2323
.await
24-
.is_some()
24+
.is_ok()
2525
}
2626

2727
#[tokio::test]

src/ui/device.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ use egui::{
1414
use image::imageops;
1515
use parking_lot::{lock_api, RawRwLock, RwLock};
1616

17-
use super::status::{Stat};
18-
1917
const SCREEN_SIZE: [usize; 2] = [320, 80];
2018

2119
pub struct Device {
@@ -41,7 +39,7 @@ impl Device {
4139
}
4240
}
4341

44-
pub fn show(&mut self, ui: &mut Ui, ip: &str, stats: Option<&Stat>) {
42+
pub fn show(&mut self, ui: &mut Ui, ip: &str) {
4543
SidePanel::right("panel")
4644
.show_separator_line(true)
4745
.show_inside(ui, |ui| {

src/ui/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl App {
9696
ui.separator();
9797
});
9898

99-
self.device.show(ui, &self.config.ip, self.stat.as_ref());
99+
self.device.show(ui, &self.config.ip);
100100
if !self.config.ip.is_empty() {
101101
let ip = &self.config.ip;
102102
match current_tab.as_str() {

src/ui/screen.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use core::panic;
21
use std::{
32
sync::{mpsc, Arc},
43
thread, time,
@@ -13,7 +12,6 @@ const SIZE: [usize; 2] = [320, 80];
1312

1413
pub fn show(ui: &mut Ui, ip: &str, texture: Arc<RwLock<TextureHandle>>) -> anyhow::Result<()> {
1514
if ui.button("Refresh").clicked() {
16-
panic!("Ganz großer Fehler");
1715
return threaded_screen(ip.to_owned(), texture);
1816
}
1917

src/ui/statusbar.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ impl StatusBar {
2828
ui.add(Button::new(" ? ").corner_radius(40.0))
2929
.clicked()
3030
.then(|| self.show_about = true);
31-
let ret = ui
32-
.add(Button::new("Save"))
33-
.clicked()
34-
.then(|| match config.write() {
31+
let ret = if ui.add(Button::new("Save")).clicked() {
32+
match config.write() {
3533
Ok(()) => anyhow::Ok(()),
3634
Err(e) => anyhow::bail!(e),
37-
})
38-
.unwrap_or(Ok(()));
35+
}
36+
} else {
37+
Ok(())
38+
};
3939
ui.add(
4040
TextEdit::singleline(&mut config.ip)
4141
.hint_text("IP")

0 commit comments

Comments
 (0)