Skip to content

Commit e605654

Browse files
committed
chore: lint
1 parent b5366b9 commit e605654

4 files changed

Lines changed: 21 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ on:
88

99
env:
1010
CARGO_TERM_COLOR: always
11+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
1112

1213
jobs:
1314
check:
1415
name: Check & Lint
1516
runs-on: ubuntu-latest
1617
steps:
1718
- uses: actions/checkout@v4
18-
- uses: dtolnay/rust-toolchain@stable
19+
- uses: dtolnay/rust-toolchain@v1
1920
with:
21+
toolchain: stable
2022
components: clippy, rustfmt
2123
- uses: Swatinem/rust-cache@v2
2224
- name: Check formatting
@@ -34,7 +36,9 @@ jobs:
3436
os: [ubuntu-latest, macos-latest, windows-latest]
3537
steps:
3638
- uses: actions/checkout@v4
37-
- uses: dtolnay/rust-toolchain@stable
39+
- uses: dtolnay/rust-toolchain@v1
40+
with:
41+
toolchain: stable
3842
- uses: Swatinem/rust-cache@v2
3943
- name: Run tests
4044
run: cargo test --verbose

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ permissions:
1010

1111
env:
1212
CARGO_TERM_COLOR: always
13+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
1314

1415
jobs:
1516
# Verify tests pass before building release artifacts
@@ -18,7 +19,9 @@ jobs:
1819
runs-on: ubuntu-latest
1920
steps:
2021
- uses: actions/checkout@v4
21-
- uses: dtolnay/rust-toolchain@stable
22+
- uses: dtolnay/rust-toolchain@v1
23+
with:
24+
toolchain: stable
2225
- uses: Swatinem/rust-cache@v2
2326
- run: cargo test --verbose
2427

@@ -62,8 +65,9 @@ jobs:
6265
archive: zip
6366
steps:
6467
- uses: actions/checkout@v4
65-
- uses: dtolnay/rust-toolchain@stable
68+
- uses: dtolnay/rust-toolchain@v1
6669
with:
70+
toolchain: stable
6771
targets: ${{ matrix.target }}
6872
- uses: Swatinem/rust-cache@v2
6973

src/main.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,13 @@ fn inhibit_sleep() -> Option<Child> {
112112
#[cfg(target_os = "linux")]
113113
{
114114
ProcessCommand::new("systemd-inhibit")
115-
.args(["--what=idle", "--who=pomodoro-cli", "--why=Timer running", "sleep", "infinity"])
115+
.args([
116+
"--what=idle",
117+
"--who=pomodoro-cli",
118+
"--why=Timer running",
119+
"sleep",
120+
"infinity",
121+
])
116122
.spawn()
117123
.ok()
118124
}
@@ -130,11 +136,7 @@ fn run_pomodoro(cfg: &Config, keep_awake: bool) {
130136
}
131137

132138
// Optionally prevent display sleep
133-
let mut sleep_guard = if keep_awake {
134-
inhibit_sleep()
135-
} else {
136-
None
137-
};
139+
let mut sleep_guard = if keep_awake { inhibit_sleep() } else { None };
138140

139141
// Enable raw mode for keyboard input
140142
if let Err(e) = terminal::enable_raw_mode() {

src/stats.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ pub fn show_stats() {
1111
}
1212

1313
let today = Local::now().date_naive();
14-
let week_start = today
15-
- chrono::Duration::days(today.weekday().num_days_from_monday() as i64);
14+
let week_start = today - chrono::Duration::days(today.weekday().num_days_from_monday() as i64);
1615

1716
let mut today_work = 0u64;
1817
let mut today_count = 0u32;

0 commit comments

Comments
 (0)