summaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2023-08-24 20:26:46 -0400
committerGitHub <noreply@github.com>2023-08-24 20:26:46 -0400
commite8f6d4853a3c320f1de53451c39ef7871d18623d (patch)
tree0b7a6d8732d0b4556767086a24f18d812dd0c4e5 /src/app
parent713b1874b703518585a6e867a176f35c4f66c202 (diff)
other: appease clippy after Rust 1.72.0 (#1281)
* deps: use clap 4.4.0 to remove is-terminal * fmt * appease clippy * fmt again * Revert "deps: use clap 4.4.0 to remove is-terminal" This reverts commit 78aa6ec8481d38357adc09e262aa5df87796b6c7.
Diffstat (limited to 'src/app')
-rw-r--r--src/app/data_harvester/disks.rs2
-rw-r--r--src/app/data_harvester/temperature/linux.rs2
-rw-r--r--src/app/query.rs1
-rw-r--r--src/app/states.rs4
4 files changed, 4 insertions, 5 deletions
diff --git a/src/app/data_harvester/disks.rs b/src/app/data_harvester/disks.rs
index e27f7f75..c4a66eff 100644
--- a/src/app/data_harvester/disks.rs
+++ b/src/app/data_harvester/disks.rs
@@ -97,7 +97,7 @@ cfg_if! {
/// 2. Is the entry denied through any filter? That is, does it match an entry in a
/// filter where `is_list_ignored` is `true`? If so, we always deny this entry.
/// 3. Anything else is allowed.
-pub(self) fn keep_disk_entry(
+pub fn keep_disk_entry(
disk_name: &str, mount_point: &str, disk_filter: &Option<Filter>, mount_filter: &Option<Filter>,
) -> bool {
match (disk_filter, mount_filter) {
diff --git a/src/app/data_harvester/temperature/linux.rs b/src/app/data_harvester/temperature/linux.rs
index 328b0761..8021bc8c 100644
--- a/src/app/data_harvester/temperature/linux.rs
+++ b/src/app/data_harvester/temperature/linux.rs
@@ -318,7 +318,7 @@ fn add_thermal_zone_temperatures(
) {
let path = Path::new("/sys/class/thermal");
let Ok(read_dir) = path.read_dir() else {
- return
+ return;
};
let mut seen_names: HashMap<String, u32> = HashMap::new();
diff --git a/src/app/query.rs b/src/app/query.rs
index 67131893..b99fb0ec 100644
--- a/src/app/query.rs
+++ b/src/app/query.rs
@@ -328,7 +328,6 @@ pub fn parse_query(
}),
)),
});
- } else {
}
}
_ => {
diff --git a/src/app/states.rs b/src/app/states.rs
index 0f01af75..f22a0221 100644
--- a/src/app/states.rs
+++ b/src/app/states.rs
@@ -219,7 +219,7 @@ impl AppSearchState {
.next_boundary(chunk, start_position)
.unwrap();
}
- _ => Err(err).unwrap(),
+ _ => panic!("{err:?}"),
},
}
}
@@ -239,7 +239,7 @@ impl AppSearchState {
self.grapheme_cursor.prev_boundary(chunk, 0).unwrap();
}
- _ => Err(err).unwrap(),
+ _ => panic!("{err:?}"),
},
}
}