Skip to content

Commit ca6b907

Browse files
committed
Damn you clippy
1 parent 9de0d0e commit ca6b907

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/cargo-about/generate.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ pub fn cmd(
5252
_rc: &mut RenderContext<'_>,
5353
out: &mut dyn Output|
5454
-> HelperResult {
55-
let param = h.param(0).ok_or(RenderError::new("param not found"))?;
55+
let param = h
56+
.param(0)
57+
.ok_or_else(|| RenderError::new("param not found"))?;
5658

5759
out.write(&serde_json::to_string_pretty(param.value())?)?;
5860
Ok(())
@@ -183,7 +185,7 @@ fn generate(
183185
_ => false,
184186
}
185187
}) {
186-
let entry = licenses.entry(req.name).or_insert_with(|| HashMap::new());
188+
let entry = licenses.entry(req.name).or_insert_with(HashMap::new);
187189

188190
let contents = match nfo.info {
189191
licenses::LicenseFileInfo::Text(ref s) => s,

0 commit comments

Comments
 (0)