@@ -20,11 +20,11 @@ const DEFAULT_FONT_ID: FontId = FontId::new(14.0, FontFamily::Monospace);
20
20
21
21
#[ derive( Clone ) ]
22
22
pub enum Print {
23
- EMPTY ,
24
- MESSAGE ( String ) ,
25
- ERROR ( String ) ,
26
- DEBUG ( String ) ,
27
- TASK ( String ) ,
23
+ Empty ,
24
+ Message ( String ) ,
25
+ Error ( String ) ,
26
+ Debug ( String ) ,
27
+ Task ( String ) ,
28
28
OK ( String ) ,
29
29
}
30
30
@@ -113,7 +113,7 @@ impl MyApp {
113
113
picked_path : PathBuf :: new ( ) ,
114
114
device : "" . to_string ( ) ,
115
115
data : DataContainer :: default ( ) ,
116
- console : vec ! [ Print :: MESSAGE (
116
+ console : vec ! [ Print :: Message (
117
117
"waiting for serial connection..," . to_owned( ) ,
118
118
) ] ,
119
119
connected_lock,
@@ -288,7 +288,7 @@ impl eframe::App for MyApp {
288
288
Err ( err) => {
289
289
print_to_console (
290
290
& self . print_lock ,
291
- Print :: ERROR ( format ! ( "send_tx thread send failed: {:?}" , err) ) ,
291
+ Print :: Error ( format ! ( "send_tx thread send failed: {:?}" , err) ) ,
292
292
) ;
293
293
}
294
294
}
@@ -392,7 +392,7 @@ impl eframe::App for MyApp {
392
392
Err ( err) => {
393
393
print_to_console (
394
394
& self . print_lock ,
395
- Print :: ERROR ( format ! ( "clear_tx thread send failed: {:?}" , err) ) ,
395
+ Print :: Error ( format ! ( "clear_tx thread send failed: {:?}" , err) ) ,
396
396
) ;
397
397
}
398
398
}
@@ -433,7 +433,7 @@ impl eframe::App for MyApp {
433
433
Err ( err) => {
434
434
print_to_console (
435
435
& self . print_lock ,
436
- Print :: ERROR ( format ! (
436
+ Print :: Error ( format ! (
437
437
"save_tx thread send failed: {:?}" ,
438
438
err
439
439
) ) ,
@@ -487,8 +487,8 @@ impl eframe::App for MyApp {
487
487
. show_rows ( ui, row_height, num_rows, |ui, row_range| {
488
488
for row in row_range {
489
489
match self . console [ row] . clone ( ) {
490
- Print :: EMPTY => { }
491
- Print :: MESSAGE ( s) => {
490
+ Print :: Empty => { }
491
+ Print :: Message ( s) => {
492
492
let text = "[MSG] " . to_string ( ) ;
493
493
ui. horizontal_wrapped ( |ui| {
494
494
let color = if self . dark_mode {
@@ -508,7 +508,7 @@ impl eframe::App for MyApp {
508
508
) ;
509
509
} ) ;
510
510
}
511
- Print :: ERROR ( s) => {
511
+ Print :: Error ( s) => {
512
512
ui. horizontal_wrapped ( |ui| {
513
513
let text = "[ERR] " . to_string ( ) ;
514
514
ui. label (
@@ -523,7 +523,7 @@ impl eframe::App for MyApp {
523
523
) ;
524
524
} ) ;
525
525
}
526
- Print :: DEBUG ( s) => {
526
+ Print :: Debug ( s) => {
527
527
if self . gui_conf . debug {
528
528
let color = if self . dark_mode {
529
529
egui:: Color32 :: YELLOW
@@ -545,7 +545,7 @@ impl eframe::App for MyApp {
545
545
} ) ;
546
546
}
547
547
}
548
- Print :: TASK ( s) => {
548
+ Print :: Task ( s) => {
549
549
ui. horizontal_wrapped ( |ui| {
550
550
let text = "[ ] " . to_string ( ) ;
551
551
ui. label (
0 commit comments