Skip to content

Commit de64609

Browse files
committed
Address clippy lints for Path variable printing
1 parent e967ac6 commit de64609

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/node/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,7 @@ impl Node {
136136
std::path::Component::CurDir => {}
137137
_ => {
138138
return Err(anyhow!(
139-
"Unexpected non-normal path segment in class lookup: {:?}",
140-
d
139+
"Unexpected non-normal path segment in class lookup: {d:?}",
141140
))
142141
}
143142
}

src/node/nodeinfo.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,10 @@ impl NodeInfoMeta {
9898
self.parts
9999
.iter()
100100
.map(|s| {
101-
s.to_str()
102-
.ok_or(anyhow!("Unable to convert path segment {s:?} to a string"))
101+
s.to_str().ok_or(anyhow!(
102+
"Unable to convert path segment {} to a string",
103+
s.display()
104+
))
103105
})
104106
.collect::<Result<Vec<&str>, _>>()?
105107
};

0 commit comments

Comments
 (0)