mirror of
https://github.com/sg4r/proxmox-backup-client.git
synced 2026-04-26 07:55:49 +03:00
[GH-ISSUE #12] multiple map_err found #11
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmox-backup-client#11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sg4r on GitHub (Mar 29, 2021).
Original GitHub issue: https://github.com/sg4r/proxmox-backup-client/issues/12
hi,
when i build with cargo i have the error since version 1.0.8, but not with previous versions.
an idea ?
see branch v1.0.11
cargo build --release --bin proxmox-backup-client --bin pxar
...
Compiling proxmox v0.11.0 (git://git.proxmox.com/git/proxmox.git?rev=1fce0ff41ddeb177f92874bf4e95a775cfd99c69#1fce0ff4)
Compiling zstd-sys v1.4.13+zstd.1.4.3
Compiling zstd-safe v1.4.13+zstd.1.4.3
Compiling zstd v0.4.28+zstd.1.4.3
Compiling proxmox-backup v1.0.11 (/root/proxmox-backup-client/proxmox-backup)
error[E0034]: multiple applicable items in scope
--> src/server/rest.rs:310:10
|
310 | .map_err(|err| http_err!(BAD_REQUEST, "Promlems reading request body: {}", err))
| ^^^^^^^ multiple
map_errfound|
= note: candidate #1 is defined in an impl of the trait
HttpBodyfor the typeBody= note: candidate #2 is defined in an impl of the trait
futures::TryFutureExtfor the typeFut= note: candidate #3 is defined in an impl of the trait
futures::TryStreamExtfor the typeShelp: disambiguate the associated function for candidate #1
|
309 | let body = HttpBody::map_err(req_body, |err| http_err!(BAD_REQUEST, "Promlems reading request body: {}", err))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: disambiguate the associated function for candidate #2
|
309 | let body = futures::TryFutureExt::map_err(req_body, |err| http_err!(BAD_REQUEST, "Promlems reading request body: {}", err))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: disambiguate the associated function for candidate #3
|
309 | let body = futures::TryStreamExt::map_err(req_body, |err| http_err!(BAD_REQUEST, "Promlems reading request body: {}", err))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the size for values of type
[u8]cannot be known at compilation time--> src/server/rest.rs:309:9
|
309 | let body = req_body
| ^^^^ doesn't have a size known at compile-time
|
= help: the trait
Sizedis not implemented for[u8]= note: all local variables must have a statically known size
= help: unsized locals are gated as an unstable feature
error[E0277]: the size for values of type
[u8]cannot be known at compilation time--> src/server/rest.rs:309:16
|
309 | let body = req_body
| ________________^
310 | | .map_err(|err| http_err!(BAD_REQUEST, "Promlems reading request body: {}", err))
311 | | .try_fold(Vec::new(), |mut acc, chunk| async move {
312 | | if acc.len() + chunk.len() < 64*1024 { //fimxe: max request body size?
... |
317 | | }
318 | | }).await?;
| |_________________^ doesn't have a size known at compile-time
|
= help: the trait
Sizedis not implemented for[u8]= note: all local variables must have a statically known size
@1nv0k32 commented on GitHub (Mar 29, 2021):
I found this patch on AUR:
https://aur.archlinux.org/cgit/aur.git/tree/0003-fix-map_err.patch?h=proxmox-backup-client
@sg4r commented on GitHub (Mar 29, 2021):
hi 1nv0k32,
Thanks for the patch that corrects this problem.
I now have a link problem #14
@sg4r commented on GitHub (Apr 5, 2021):
it's corrected.