Skip to content

Commit 858a4fb

Browse files
committed
rustfmt
1 parent 9c03c5c commit 858a4fb

File tree

4 files changed

+24
-13
lines changed

4 files changed

+24
-13
lines changed

.github/workflows/rust.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,25 @@ jobs:
1414

1515
runs-on: ubuntu-20.04
1616
steps:
17-
- uses: actions/checkout@v3
18-
- run: sudo apt-get update && sudo apt-get install -y libclang-dev libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev && sudo apt-get install libudev-dev && cargo install cargo-bundle
19-
- name: Check
20-
run: cargo check --verbose
21-
- name: Format
22-
run: cargo fmt --all -- --check --verbose
17+
- uses: actions/checkout@v4
18+
19+
- name: Install libraries
20+
run: sudo apt-get update && sudo apt-get install -y libclang-dev libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev && sudo apt-get install libudev-dev && cargo install cargo-bundle
21+
22+
- name: Update
23+
run: cargo update
24+
25+
- name: Build
26+
run: cargo build --all --all-features
27+
28+
- name: Cargo check
29+
run: cargo check --all --all-features
30+
31+
- name: Rustfmt
32+
run: cargo fmt --all -- --check
33+
2334
- name: Clippy
24-
run: cargo clippy -- -D warnings --verbose
25-
- name: Run tests
26-
run: cargo test --verbose
35+
run: cargo clippy --all --all-targets --all-features
36+
37+
- name: Test
38+
run: cargo test --all --all-features

src/custom_highlighter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
extern crate regex;
12
use eframe::egui::{self, text::LayoutJob, Color32, TextFormat};
23
use eframe::egui::{FontFamily, FontId};
34

4-
extern crate regex;
55
use regex::Regex;
66
use regex::RegexSet;
77
const DEFAULT_FONT_ID: FontId = FontId::new(14.0, FontFamily::Monospace);

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ use eframe::{egui, icon_data};
2020
use preferences::AppInfo;
2121

2222
mod color_picker;
23+
mod custom_highlighter;
2324
mod data;
2425
mod gui;
2526
mod io;
2627
mod serial;
2728
mod toggle;
28-
mod custom_highlighter;
2929

3030
const APP_INFO: AppInfo = AppInfo {
3131
name: "Serial Monitor",

src/serial.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,14 @@ pub struct SerialDevices {
2020
pub color_vals: Vec<Vec<f32>>,
2121
pub number_of_plots: Vec<usize>,
2222
pub number_of_highlights: Vec<usize>,
23-
2423
}
2524

2625
impl Default for SerialDevices {
2726
fn default() -> Self {
2827
SerialDevices {
2928
devices: vec![Device::default()],
3029
labels: vec![vec!["Column 0".to_string()]],
31-
highlight_labels:vec![vec!["".to_string()]],
30+
highlight_labels: vec![vec!["".to_string()]],
3231
colors: vec![vec![COLORS[0]]],
3332
color_vals: vec![vec![0.0]],
3433
number_of_plots: vec![1],

0 commit comments

Comments
 (0)