From 0d4b7f0271e0dc15e86cb396e9356a0aaf94adba Mon Sep 17 00:00:00 2001 From: Maximiliano Sandoval Date: Fri, 16 Jun 2023 10:27:30 +0200 Subject: [PATCH] clippy fixes: Box::new(_) of default value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From rust-lang: > Why is this bad? > > First, it’s more complex, involving two calls instead of one. Second, > Box::default() can be faster in certain cases. Signed-off-by: Maximiliano Sandoval --- src/acme/plugin.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/acme/plugin.rs b/src/acme/plugin.rs index 478d0666..5fe8993d 100644 --- a/src/acme/plugin.rs +++ b/src/acme/plugin.rs @@ -35,7 +35,7 @@ pub(crate) fn get_acme_plugin( } "standalone" => { // this one has no config - Box::new(StandaloneServer::default()) + Box::::default() } other => bail!("missing implementation for plugin type '{}'", other), }))