Update clippy settings and fix a few clippy warnings.

This commit is contained in:
Dan Gohman
2019-01-07 11:21:28 -08:00
parent a7aee246e9
commit 9eba81a8d9
40 changed files with 246 additions and 233 deletions

View File

@@ -152,8 +152,7 @@ impl Backend for FaerieBackend {
namespace: &ModuleNamespace<Self>,
code_size: u32,
) -> ModuleResult<FaerieCompiledFunction> {
let mut code: Vec<u8> = Vec::with_capacity(code_size as usize);
code.resize(code_size as usize, 0);
let mut code: Vec<u8> = vec![0; code_size as usize];
// Non-lexical lifetimes would obviate the braces here.
{

View File

@@ -12,7 +12,7 @@
#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
#![cfg_attr(
feature = "cargo-clippy",
allow(new_without_default, new_without_default_derive)
allow(clippy::new_without_default, clippy::new_without_default_derive)
)]
#![cfg_attr(
feature = "cargo-clippy",