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 5D67595107 for ; Tue, 28 Feb 2023 12:35:43 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 3A37F6494 for ; Tue, 28 Feb 2023 12:35:43 +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 for ; Tue, 28 Feb 2023 12:35:42 +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 C0E9A48BAC for ; Tue, 28 Feb 2023 12:35:41 +0100 (CET) Date: Tue, 28 Feb 2023 12:35:34 +0100 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox Backup Server development discussion References: <20230223125540.1298442-1-h.laimer@proxmox.com> <20230223125540.1298442-5-h.laimer@proxmox.com> In-Reply-To: <20230223125540.1298442-5-h.laimer@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.16.0 (https://github.com/astroidmail/astroid) Message-Id: <1677583987.e8gul8zr3v.astroid@yuna.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.125 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [main.rs, proxmox.com, mount.rs, catalog.rs, diff.rs] Subject: Re: [pbs-devel] [PATCH proxmox-backup v2 4/5] pbs-client: accept a ref to a HttpClient in BackupReader::starting 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, 28 Feb 2023 11:35:43 -0000 On February 23, 2023 1:55 pm, Hannes Laimer wrote: > ... since the function doesn't actually need the moved value. >=20 > Signed-off-by: Hannes Laimer > --- >=20 > needed for next patch but incomplete and breaks build of proxmox-file-restore.. you can order thi= s up front if you still need it in the next series, since it can be applied independently.. error[E0308]: mismatched types --> proxmox-file-restore/src/main.rs:110:9 | 109 | let client =3D BackupReader::start( | ------------------- arguments to this function are i= ncorrect 110 | client, | ^^^^^^ | | | expected `&HttpClient`, found struct `HttpClient` | help: consider borrowing here: `&client` | note: associated function defined here error[E0308]: mismatched types --> proxmox-file-restore/src/main.rs:433:9 | 432 | let client =3D BackupReader::start( | ------------------- arguments to this function are i= ncorrect 433 | client, | ^^^^^^ | | | expected `&HttpClient`, found struct `HttpClient` | help: consider borrowing here: `&client` | note: associated function defined here For more information about this error, try `rustc --explain E0308`. error: could not compile `proxmox-file-restore` due to 2 previous errors > pbs-client/src/backup_reader.rs | 2 +- > proxmox-backup-client/src/catalog.rs | 4 ++-- > proxmox-backup-client/src/main.rs | 2 +- > proxmox-backup-client/src/mount.rs | 2 +- > src/bin/proxmox_backup_debug/diff.rs | 2 +- > 5 files changed, 6 insertions(+), 6 deletions(-) >=20 > diff --git a/pbs-client/src/backup_reader.rs b/pbs-client/src/backup_read= er.rs > index 2cd4dc27..36d8ebcf 100644 > --- a/pbs-client/src/backup_reader.rs > +++ b/pbs-client/src/backup_reader.rs > @@ -44,7 +44,7 @@ impl BackupReader { > =20 > /// Create a new instance by upgrading the connection at '/api2/json= /reader' > pub async fn start( > - client: HttpClient, > + client: &HttpClient, > crypt_config: Option>, > datastore: &str, > ns: &BackupNamespace, > diff --git a/proxmox-backup-client/src/catalog.rs b/proxmox-backup-client= /src/catalog.rs > index 8c8c1458..72b22e67 100644 > --- a/proxmox-backup-client/src/catalog.rs > +++ b/proxmox-backup-client/src/catalog.rs > @@ -75,7 +75,7 @@ async fn dump_catalog(param: Value) -> Result { > let client =3D connect(&repo)?; > =20 > let client =3D BackupReader::start( > - client, > + &client, > crypt_config.clone(), > repo.store(), > &backup_ns, > @@ -187,7 +187,7 @@ async fn catalog_shell(param: Value) -> Result<(), Er= ror> { > }; > =20 > let client =3D BackupReader::start( > - client, > + &client, > crypt_config.clone(), > repo.store(), > &backup_ns, > diff --git a/proxmox-backup-client/src/main.rs b/proxmox-backup-client/sr= c/main.rs > index 55198108..e7b5bde6 100644 > --- a/proxmox-backup-client/src/main.rs > +++ b/proxmox-backup-client/src/main.rs > @@ -1286,7 +1286,7 @@ async fn restore( > }; > =20 > let client =3D BackupReader::start( > - client, > + &client, > crypt_config.clone(), > repo.store(), > &ns, > diff --git a/proxmox-backup-client/src/mount.rs b/proxmox-backup-client/s= rc/mount.rs > index 6810c19c..66bc56f7 100644 > --- a/proxmox-backup-client/src/mount.rs > +++ b/proxmox-backup-client/src/mount.rs > @@ -234,7 +234,7 @@ async fn mount_do(param: Value, pipe: Option= ) -> Result { > }; > =20 > let client =3D BackupReader::start( > - client, > + &client, > crypt_config.clone(), > repo.store(), > &backup_ns, > diff --git a/src/bin/proxmox_backup_debug/diff.rs b/src/bin/proxmox_backu= p_debug/diff.rs > index 288d35ce..bb68322b 100644 > --- a/src/bin/proxmox_backup_debug/diff.rs > +++ b/src/bin/proxmox_backup_debug/diff.rs > @@ -293,7 +293,7 @@ async fn create_backup_reader( > }; > let client =3D connect(¶ms.repo)?; > let backup_reader =3D BackupReader::start( > - client, > + &client, > params.crypt_config.clone(), > params.repo.store(), > ¶ms.namespace, > --=20 > 2.30.2 >=20 >=20 >=20 > _______________________________________________ > pbs-devel mailing list > pbs-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel >=20 >=20 >=20