Skip to content

Commit ae6b9c4

Browse files
committed
lint: fix clippy
1 parent a873f9f commit ae6b9c4

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/json_data/schema_version.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ impl TryFrom<String> for SchemaVersion {
3535
}
3636
}
3737

38-
impl<'a> From<SchemaVersion> for &'a str {
38+
impl From<SchemaVersion> for &str {
3939
fn from(_: SchemaVersion) -> Self {
4040
SCHEMA_VERSION
4141
}

src/visualizer/methods/tree_table.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ where
121121
for excluded_row_index in excluded_row_indices.iter().copied() {
122122
let is_child = |row: &&TreeRow<&Name, Size>| {
123123
row.parent()
124-
.map_or(false, |node_info| node_info.row_index == excluded_row_index)
124+
.is_some_and(|node_info| node_info.row_index == excluded_row_index)
125125
};
126126
intermediate_table
127127
.index(excluded_row_index..)
@@ -167,7 +167,7 @@ where
167167
{
168168
let is_sibling = |row: &&TreeRow<&Name, Size>| {
169169
row.parent()
170-
.map_or(false, |parent| parent.row_index == parent_row_index)
170+
.is_some_and(|parent| parent.row_index == parent_row_index)
171171
};
172172
let is_excluded =
173173
|row: &TreeRow<&Name, Size>| excluded_row_indices.contains(&row.row_index);

tests/json.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ fn json_input() {
144144

145145
#[test]
146146
fn json_output_json_input() {
147+
#![allow(
148+
clippy::zombie_processes,
149+
reason = "can't wait without violating borrow rule"
150+
)]
151+
147152
let workspace = SampleWorkspace::default();
148153

149154
let json_output = Command::new(PDU)

0 commit comments

Comments
 (0)