From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 62CCF65A21 for ; Tue, 8 Mar 2022 13:21:29 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 537B2256D for ; Tue, 8 Mar 2022 13:20:59 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 7C321255A for ; Tue, 8 Mar 2022 13:20:58 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 53FF5463C0 for ; Tue, 8 Mar 2022 13:20:58 +0100 (CET) From: Dominik Csapak To: pbs-devel@lists.proxmox.com Date: Tue, 8 Mar 2022 13:20:57 +0100 Message-Id: <20220308122057.3059305-2-d.csapak@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220308122057.3059305-1-d.csapak@proxmox.com> References: <20220308122057.3059305-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.153 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [api.rs] Subject: [pbs-devel] [PATCH proxmox-backup 2/2] proxmox-backup-debug api: rustfmt fixes X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2022 12:21:29 -0000 Signed-off-by: Dominik Csapak --- src/bin/proxmox_backup_debug/api.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/bin/proxmox_backup_debug/api.rs b/src/bin/proxmox_backup_debug/api.rs index 64a4c01b..ba2117e4 100644 --- a/src/bin/proxmox_backup_debug/api.rs +++ b/src/bin/proxmox_backup_debug/api.rs @@ -8,8 +8,8 @@ use tokio::signal::unix::{signal, SignalKind}; use std::collections::HashMap; use proxmox_router::{cli::*, ApiHandler, ApiMethod, RpcEnvironment, SubRoute}; -use proxmox_schema::{api, ApiType, ParameterSchema, Schema}; use proxmox_schema::format::DocumentationFormat; +use proxmox_schema::{api, ApiType, ParameterSchema, Schema}; use pbs_api_types::{PROXMOX_UPID_REGEX, UPID}; use pbs_client::view_task_result; @@ -23,7 +23,9 @@ const URL_ASCIISET: percent_encoding::AsciiSet = percent_encoding::NON_ALPHANUME macro_rules! complete_api_path { ($capability:expr) => { |complete_me: &str, _map: &HashMap| { - proxmox_async::runtime::block_on(async { complete_api_path_do(complete_me, $capability).await }) + proxmox_async::runtime::block_on(async { + complete_api_path_do(complete_me, $capability).await + }) } }; } @@ -382,8 +384,7 @@ struct ApiDirEntry { } const LS_SCHEMA: &proxmox_schema::Schema = - &proxmox_schema::ArraySchema::new("List of child links", &ApiDirEntry::API_SCHEMA) - .schema(); + &proxmox_schema::ArraySchema::new("List of child links", &ApiDirEntry::API_SCHEMA).schema(); async fn get_api_children( path: String, @@ -436,7 +437,11 @@ async fn get_api_children( }, )] /// Get API usage information for -async fn ls(path: Option, mut param: Value, rpcenv: &mut dyn RpcEnvironment) -> Result<(), Error> { +async fn ls( + path: Option, + mut param: Value, + rpcenv: &mut dyn RpcEnvironment, +) -> Result<(), Error> { let output_format = extract_output_format(&mut param); let options = TableFormatOptions::new() -- 2.30.2