Skip to content

Commit

Permalink
fix: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
fundon committed Oct 26, 2022
1 parent 9b5c1c1 commit 32bde7e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion viz-core/src/types/params/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@ impl Params {
{
self.iter()
.find(|p| p.0 == name)
.ok_or_else(|| ParamsError::SingleParse(format!("missing {} param", name)))?
.ok_or_else(|| {
let mut s = String::new();
s.push_str("missing ");
s.push_str(name);
s.push_str(" param");
ParamsError::SingleParse(s)
})?
.1
.parse()
.map_err(|e: T::Err| ParamsError::SingleParse(e.to_string()))
Expand Down

0 comments on commit 32bde7e

Please sign in to comment.