Skip to content

Commit 26e1522

Browse files
committed
improv: Adjust use formatting
1 parent cd49cff commit 26e1522

File tree

14 files changed

+82
-50
lines changed

14 files changed

+82
-50
lines changed

src/application/key.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
use std::cell::RefCell;
22

3-
use crate::color::Rgb;
4-
use super::page::Page;
5-
use super::picker::SCANCODE_LABELS;
6-
use super::rect::Rect;
3+
use crate::Rgb;
4+
use super::{
5+
Page,
6+
Rect,
7+
SCANCODE_LABELS,
8+
};
79

810
#[derive(Clone, Debug)]
911
pub struct Key {

src/application/keyboard.rs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,19 @@ use std::{
2020
str,
2121
};
2222

23-
use crate::daemon::DaemonBoard;
24-
use crate::keyboard_color_button::KeyboardColorButton;
25-
use crate::keymap::KeyMap;
26-
use super::error_dialog::error_dialog;
27-
use super::key::Key;
28-
use super::keyboard_layer::KeyboardLayer;
29-
use super::layout::Layout;
30-
use super::page::Page;
31-
use super::picker::Picker;
23+
use crate::{
24+
DaemonBoard,
25+
KeyboardColorButton,
26+
KeyMap,
27+
};
28+
use super::{
29+
error_dialog,
30+
Key,
31+
KeyboardLayer,
32+
Layout,
33+
Page,
34+
Picker,
35+
};
3236

3337
#[derive(Default, gtk::CompositeTemplate)]
3438
pub struct KeyboardInner {

src/application/keyboard_layer.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ use std::{
1010
};
1111
use once_cell::unsync::OnceCell;
1212

13-
use crate::color::Rgb;
14-
use super::key::Key;
15-
use super::page::Page;
13+
use crate::Rgb;
14+
use super::{Key, Page};
1615

1716
const SCALE: f64 = 64.0;
1817
const MARGIN: f64 = 2.;

src/application/layout/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ use std::collections::HashMap;
55
mod physical_layout;
66
pub(super) use physical_layout::PhysicalLayout;
77

8-
use crate::color::Rgb;
9-
use crate::keymap::KeyMap;
10-
use super::key::Key;
11-
use super::rect::Rect;
8+
use crate::{KeyMap, Rgb};
9+
use super::{Key, Rect};
1210
use physical_layout::{PhysicalKeyEnum, PhysicalLayoutEntry};
1311

1412
pub(super) struct Layout {

src/application/main_window.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,18 @@ use gtk::subclass::prelude::*;
44
use std::sync::atomic::{AtomicUsize, Ordering};
55
use std::rc::Rc;
66

7-
use crate::daemon::{Daemon, DaemonBoard, DaemonClient, DaemonDummy, DaemonServer};
8-
use super::keyboard::Keyboard;
9-
use super::picker::Picker;
10-
use super::shortcuts_window::shortcuts_window;
7+
use crate::{
8+
Daemon,
9+
DaemonBoard,
10+
DaemonClient,
11+
DaemonDummy,
12+
DaemonServer,
13+
};
14+
use super::{
15+
Keyboard,
16+
Picker,
17+
shortcuts_window,
18+
};
1119

1220
#[derive(Default, gtk::CompositeTemplate)]
1321
pub struct MainWindowInner {

src/application/mod.rs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
use cascade::cascade;
2-
use gio::prelude::*;
32
use glib::subclass;
4-
use glib::subclass::prelude::*;
53
use gtk::prelude::*;
64
use gtk::subclass::prelude::*;
75
use once_cell::unsync::OnceCell;
86

9-
use main_window::MainWindow;
10-
117
mod about_dialog;
128
mod error_dialog;
139
mod key;
@@ -20,6 +16,19 @@ mod picker;
2016
mod rect;
2117
mod shortcuts_window;
2218

19+
use self::{
20+
error_dialog::*,
21+
key::*,
22+
keyboard::*,
23+
keyboard_layer::*,
24+
layout::*,
25+
main_window::*,
26+
page::*,
27+
picker::*,
28+
rect::*,
29+
shortcuts_window::*,
30+
};
31+
2332
pub struct ConfiguratorAppInner {
2433
phony_board_names: OnceCell<Vec<String>>,
2534
}

src/application/picker/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
use super::keyboard::Keyboard;
21
use cascade::cascade;
32
use glib::clone;
43
use glib::subclass;
5-
use glib::subclass::prelude::*;
64
use gtk::prelude::*;
75
use gtk::subclass::prelude::*;
86
use once_cell::sync::Lazy;
@@ -12,6 +10,8 @@ use std::{
1210
rc::Rc,
1311
};
1412

13+
use super::Keyboard;
14+
1515
mod picker_group;
1616
mod picker_json;
1717
mod picker_key;

src/application/picker/picker_group.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use cascade::cascade;
22
use gtk::prelude::*;
33
use std::rc::Rc;
44

5-
use super::picker_key::PickerKey;
5+
use super::PickerKey;
66

77
pub(super) struct PickerGroup {
88
/// Number of keys to show in each row

src/daemon/board.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::rc::Rc;
22

3-
use crate::color::Rgb;
3+
use crate::Rgb;
44
use super::Daemon;
55

66
#[derive(Clone, glib::GBoxed)]

src/daemon/dummy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::{
66
collections::HashMap,
77
};
88

9-
use crate::color::Rgb;
9+
use crate::Rgb;
1010
use super::Daemon;
1111

1212
#[derive(Default)]

0 commit comments

Comments
 (0)