-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consume a paginated restful - faulty #620
Comments
Yep, that's what the api is returning |
Sorry, I don't get your comment. Further, I couldn't consume elements from the iter.
What is the best way to address that ? |
I mean if you go to the link I provided you will see this: The API returns crate_id = crate name "crate_id":"error-chain" error[E0382]: use of moved value: |
1. When I run the program it doesn't return the value of the crate_id, instead it returns a copy of the calling argument that had been stored in the RD vector. (Duplicate value).
2. I tried that approach but the compiler complained about the clone trait not available for type iter.
Regards,
Mohammed
…On Dec 1, 2020, 5:37 PM, at 5:37 PM, Andrew Gauger ***@***.***> wrote:
I mean if you go to the link I provided you will see this:
{"dependencies":[{"id":987053,"version_id":188578,"crate_id":"error-chain","req":"^0.12","optional":false,"default_features":false,"features":[],"target":null,"kind":"normal","downloads":3135857}
The API returns crate_id = crate name
"crate_id":"error-chain"
error[E0382]: use of moved value: `dep`
When you follow dep by the ? you are performing an operation on it.
You can do `let depends=dep?;` and then println! it twice
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#620 (comment)
|
Link - https://rust-lang-nursery.github.io/rust-cookbook/web/clients/apis.html#consume-a-paginated-restful-api
When i run the example at retrieves the dependencies however, the crate_id is populated with the source crate name..
example.
The text was updated successfully, but these errors were encountered: