Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cspell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ words:
- BCHARGE
- bluez
- bokmaal
- btrfs
- bugz
- busctl
- caldav
Expand Down
3 changes: 2 additions & 1 deletion src/blocks/disk_space.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ async fn get_btrfs(path: &str) -> Result<(u64, u64, u64, u64)> {
const OUTPUT_CHANGED: &str = "Btrfs filesystem usage output format changed";

fn remove_estimate_min(estimate_str: &str) -> Result<&str> {
estimate_str.trim_matches('\t')
estimate_str
.trim_matches('\t')
.split_once("\t")
.ok_or(Error::new(OUTPUT_CHANGED))
.map(|v| v.0)
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ fn main() {
}

/// Restart in-place
#[allow(unreachable_code)]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ammgws can you confirm if you think this is the best way to work around the errors:

error: unreachable expression
  --> src/main.rs:89:5
   |
88 |     nix::unistd::execvp(&exe, &arg).unwrap();
   |     ---------------------------------------- any code following this expression is unreachable
89 |     unreachable!();
   |     ^^^^^^^^^^^^^^ unreachable expression
   |
note: this expression has type `std::convert::Infallible`, which is uninhabited
  --> src/main.rs:88:5
   |
88 |     nix::unistd::execvp(&exe, &arg).unwrap();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: `-D unreachable-code` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unreachable_code)]`

Copy link
Collaborator

@ammgws ammgws Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get why this is hitting now; this has passed before. Interestingly running with nightly (clippy 0.1.94 (0208ee09be 2025-12-14) does not generate this error:

> cargo +nightly clippy 2>| rg unreach                                                                                                   (v0.35.0)|22ms|14:37:51
[0|1]>

Only when I run with stable, which on my system is clippy 0.1.92 (ded5c06cf2 2025-12-08)

>cargo +stable clippy 2>| rg unreach                                                                                               (v0.35.0)|0.2s|14:39:27
warning: unreachable expression
   |     ---------------------------------------- any code following this expression is unreachable
89 |     unreachable!();
   |     ^^^^^^^^^^^^^^ unreachable expression
   = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default

So perhaps we can wait this one out a bit?

fn restart() -> ! {
use std::env;
use std::ffi::CString;
Expand Down