In data 16 giugno 2023 10:27:35 Maximiliano Sandoval <m.sandoval@proxmox.com> ha scritto:
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 <m.sandoval@proxmox.com>
---
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::<StandaloneServer>::default()
}
other => bail!("missing implementation for plugin type '{}'", other),
}))
--
2.39.2
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel