all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup v2 4/5] pbs-client: accept a ref to a HttpClient in BackupReader::starting
Date: Tue, 28 Feb 2023 12:35:34 +0100	[thread overview]
Message-ID: <1677583987.e8gul8zr3v.astroid@yuna.none> (raw)
In-Reply-To: <20230223125540.1298442-5-h.laimer@proxmox.com>

On February 23, 2023 1:55 pm, Hannes Laimer wrote:
> ... since the function doesn't actually need the moved value.
> 
> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
> ---
> 
> needed for next patch

but incomplete and breaks build of proxmox-file-restore.. you can order this 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 = BackupReader::start(
    |                  ------------------- arguments to this function are incorrect
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 = BackupReader::start(
    |                  ------------------- arguments to this function are incorrect
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(-)
> 
> diff --git a/pbs-client/src/backup_reader.rs b/pbs-client/src/backup_reader.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 {
>  
>      /// Create a new instance by upgrading the connection at '/api2/json/reader'
>      pub async fn start(
> -        client: HttpClient,
> +        client: &HttpClient,
>          crypt_config: Option<Arc<CryptConfig>>,
>          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<Value, Error> {
>      let client = connect(&repo)?;
>  
>      let client = BackupReader::start(
> -        client,
> +        &client,
>          crypt_config.clone(),
>          repo.store(),
>          &backup_ns,
> @@ -187,7 +187,7 @@ async fn catalog_shell(param: Value) -> Result<(), Error> {
>      };
>  
>      let client = BackupReader::start(
> -        client,
> +        &client,
>          crypt_config.clone(),
>          repo.store(),
>          &backup_ns,
> diff --git a/proxmox-backup-client/src/main.rs b/proxmox-backup-client/src/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(
>      };
>  
>      let client = BackupReader::start(
> -        client,
> +        &client,
>          crypt_config.clone(),
>          repo.store(),
>          &ns,
> diff --git a/proxmox-backup-client/src/mount.rs b/proxmox-backup-client/src/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<OwnedFd>) -> Result<Value, Error> {
>      };
>  
>      let client = 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_backup_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 = connect(&params.repo)?;
>      let backup_reader = BackupReader::start(
> -        client,
> +        &client,
>          params.crypt_config.clone(),
>          params.repo.store(),
>          &params.namespace,
> -- 
> 2.30.2
> 
> 
> 
> _______________________________________________
> pbs-devel mailing list
> pbs-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
> 
> 
> 




  reply	other threads:[~2023-02-28 11:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23 12:55 [pbs-devel] [PATCH proxmox-backup v2 0/5] local sync-jobs Hannes Laimer
2023-02-23 12:55 ` [pbs-devel] [PATCH proxmox-backup v2 1/5] api2: make Remote for SyncJob optional Hannes Laimer
2023-02-28  9:41   ` Wolfgang Bumiller
2023-02-28 11:35   ` Fabian Grünbichler
2023-02-23 12:55 ` [pbs-devel] [PATCH proxmox-backup v2 2/5] ui: add support for optional Remote in SyncJob Hannes Laimer
2023-02-23 12:55 ` [pbs-devel] [PATCH proxmox-backup v2 3/5] manager: add completion for opt. " Hannes Laimer
2023-02-23 12:55 ` [pbs-devel] [PATCH proxmox-backup v2 4/5] pbs-client: accept a ref to a HttpClient in BackupReader::starting Hannes Laimer
2023-02-28 11:35   ` Fabian Grünbichler [this message]
2023-02-23 12:55 ` [pbs-devel] [PATCH proxmox-backup v2 5/5] pull: add support for local pulling Hannes Laimer
2023-02-28 11:25   ` Wolfgang Bumiller
2023-02-28 11:36   ` Fabian Grünbichler
2023-02-28 11:35 ` [pbs-devel] [PATCH proxmox-backup v2 0/5] local sync-jobs Fabian Grünbichler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1677583987.e8gul8zr3v.astroid@yuna.none \
    --to=f.gruenbichler@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal