cloudflare / cloudflare-rs

Rust library for the Cloudflare v4 API
251 stars 74 forks source link

`v0.11` breaks async api #222

Closed Colerar closed 11 months ago

Colerar commented 11 months ago
    = help: the trait `Sync` is not implemented for `dyn cloudflare::framework::endpoint::Endpoint<Vec<DnsRecord>>`
note: future is not `Send` as this value is used across an await
   --> src/models.rs:238:18
    |
231 |                   .request(&dns::ListDnsRecords {
    |  __________________________-
232 | |                     zone_identifier,
233 | |                     params: dns::ListDnsRecordsParams {
234 | |                         name: Some(dns_name.clone()),
235 | |                         ..Default::default()
236 | |                     },
237 | |                 })
    | |_________________- has type `&dyn cloudflare::framework::endpoint::Endpoint<Vec<DnsRecord>>` which is not `Send`
238 |                   .await
    |                    ^^^^^ await occurs here, with the value maybe used later
...
245 |               };
    |                - the value is later dropped here
Colerar commented 10 months ago

How about publishing a new patch version for this issue? Because of this issue the async API is almost unavailable for version 0.11.