We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9de0d0e commit ca6b907Copy full SHA for ca6b907
src/cargo-about/generate.rs
@@ -52,7 +52,9 @@ pub fn cmd(
52
_rc: &mut RenderContext<'_>,
53
out: &mut dyn Output|
54
-> HelperResult {
55
- let param = h.param(0).ok_or(RenderError::new("param not found"))?;
+ let param = h
56
+ .param(0)
57
+ .ok_or_else(|| RenderError::new("param not found"))?;
58
59
out.write(&serde_json::to_string_pretty(param.value())?)?;
60
Ok(())
@@ -183,7 +185,7 @@ fn generate(
183
185
_ => false,
184
186
}
187
}) {
- let entry = licenses.entry(req.name).or_insert_with(|| HashMap::new());
188
+ let entry = licenses.entry(req.name).or_insert_with(HashMap::new);
189
190
let contents = match nfo.info {
191
licenses::LicenseFileInfo::Text(ref s) => s,
0 commit comments