Skip to content

Commit

Permalink
Fix nightly clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
UARTman committed Jan 9, 2023
1 parent a087f1a commit 9972cad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/hex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ impl Hex {
} else {
self.bytes()
.iter()
.map(|b| format!("{:02X}", b))
.map(|b| format!("{b:02X}"))
.collect::<Vec<String>>()
.join("-")
}
Expand Down
2 changes: 1 addition & 1 deletion src/inspect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl Sodg {
self.inspect_v(e.to, seen)
.unwrap()
.iter()
.for_each(|t| lines.push(format!(" {}", t)));
.for_each(|t| lines.push(format!(" {t}")));
}
});
Ok(lines)
Expand Down
10 changes: 5 additions & 5 deletions src/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ impl Sodg {
let vtx1 = self
.vertices
.get_mut(&v1)
.context(format!("Can't depart from ν{}, it's absent", v1))?;
.context(format!("Can't depart from ν{v1}, it's absent"))?;
vtx1.edges
.retain(|e| Self::split_a(&e.a).0 != Self::split_a(a).0);
vtx1.edges.push(Edge::new(v2, a));
let vtx2 = self
.vertices
.get_mut(&v2)
.context(format!("Can't arrive at ν{}, it's absent", v2))?;
.context(format!("Can't arrive at ν{v2}, it's absent"))?;
vtx2.parents.insert(v1);
self.validate(vec![v1, v2])?;
trace!("#bind: edge added ν{}-{}->ν{}", v1, a, v2);
Expand All @@ -103,10 +103,10 @@ impl Sodg {
let vtx = self
.vertices
.get_mut(&v)
.context(format!("Can't find ν{}", v))?;
.context(format!("Can't find ν{v}"))?;
vtx.data = d.clone();
self.validate(vec![v])?;
trace!("#data: data of ν{} set to {}", v, d);
trace!("#data: data of ν{v} set to {d}");
Ok(())
}

Expand Down Expand Up @@ -138,7 +138,7 @@ impl Sodg {
let vtx = self
.vertices
.get_mut(&v)
.context(format!("Can't find ν{}", v))?;
.context(format!("Can't find ν{v}"))?;
let data = vtx.data.clone();
vtx.taken = true;
self.collect(v)?;
Expand Down

0 comments on commit 9972cad

Please sign in to comment.