[pbs-devel] [PATCH proxmox-backup 01/15] report: type-alias function call tuple

Fabian Grünbichler f.gruenbichler at proxmox.com
Mon Jan 25 14:42:46 CET 2021


to make clippy happy.

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
could also be just #[allow(..)]ed

 src/server/report.rs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/server/report.rs b/src/server/report.rs
index 1b77f442..e89abbc5 100644
--- a/src/server/report.rs
+++ b/src/server/report.rs
@@ -29,8 +29,10 @@ fn commands() -> Vec<(&'static str, Vec<&'static str>)> {
     ]
 }
 
-    // (<description>, <function to call>)
-fn function_calls() -> Vec<(&'static str, fn() -> String)> {
+// (description, function())
+type FunctionMapping = (&'static str, fn() -> String);
+
+fn function_calls() -> Vec<FunctionMapping> {
     vec![
         ("Datastores", || {
             let config = match datastore::config() {
-- 
2.20.1






More information about the pbs-devel mailing list