Skip to content

Commit 8a0fc49

Browse files
committed
style: rustfmt (expand patterns and calls)
1 parent 635bc4f commit 8a0fc49

2 files changed

Lines changed: 20 additions & 4 deletions

File tree

src/ui/hotkeys_tab.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,13 @@ fn egui_key_token(key: egui::Key) -> Option<&'static str> {
9595
// look for a "modifier(s)+key" press in this frame's events
9696
fn capture_combo(input: &egui::InputState) -> Option<String> {
9797
for ev in &input.events {
98-
if let egui::Event::Key { key, pressed: true, modifiers, .. } = ev {
98+
if let egui::Event::Key {
99+
key,
100+
pressed: true,
101+
modifiers,
102+
..
103+
} = ev
104+
{
99105
if let Some(tok) = egui_key_token(*key) {
100106
let mut parts: Vec<&str> = Vec::new();
101107
if modifiers.ctrl {

src/ui/mod.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,15 @@ pub enum HotkeyField {
6565
// a small colored "shown/hidden" chip for the status header
6666
fn status_chip(ui: &mut egui::Ui, name: &str, hidden: bool) {
6767
let (text, color) = if hidden {
68-
(format!("{name}: hidden"), egui::Color32::from_rgb(231, 76, 60))
68+
(
69+
format!("{name}: hidden"),
70+
egui::Color32::from_rgb(231, 76, 60),
71+
)
6972
} else {
70-
(format!("{name}: shown"), egui::Color32::from_rgb(46, 204, 113))
73+
(
74+
format!("{name}: shown"),
75+
egui::Color32::from_rgb(46, 204, 113),
76+
)
7177
};
7278
ui.colored_label(color, text);
7379
}
@@ -249,7 +255,11 @@ pub fn open_settings(
249255
Box::new(move |cc| {
250256
// save the context so open_settings can wake us up later
251257
*SETTINGS_CTX.lock().unwrap() = Some(cc.egui_ctx.clone());
252-
Ok(Box::new(SettingsApp::new(config_shared, state_shared, cmd_tx)))
258+
Ok(Box::new(SettingsApp::new(
259+
config_shared,
260+
state_shared,
261+
cmd_tx,
262+
)))
253263
}),
254264
);
255265

0 commit comments

Comments
 (0)