You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NB: The problem detailed here does not cause any issue in the current state of rust-mbedtls.
bindgen exposes types from the vendor implementation, then some of them are "wrapped" in another type, for instance ssl_config types can be accessed through Config types:
This doesn't change the API at all, since it delays any errors until do_call.
Since there was already an `Into<Response> for Error`, and do_call already
had a `.unwrap_or_else(|e| e.into())`, nothing in do_call needed to change.
The only visible effect of this is that code that was previously relying on
`get("/path")` to fetch something from localhost will now get an error. I think
most of those cases would probably actually be accidents, possibly caused
by typos, e.g. `get("example.com/path")` (forgetting the https: prefix).
Fixesfortanix#105
NB: The problem detailed here does not cause any issue in the current state of rust-mbedtls.
bindgen
exposes types from the vendor implementation, then some of them are "wrapped" in another type, for instancessl_config
types can be accessed throughConfig
types:rust-mbedtls/mbedtls/src/ssl/config.rs
Lines 88 to 95 in 9e06b8e
However this mapping mechanism doesn't seem to work for types that don't implement the
Copy
trait. The reason for that is theinto_inner()
function:rust-mbedtls/mbedtls/src/wrapper_macros.rs
Lines 118 to 121 in 9e06b8e
As you can see,
self.inner
is moved, which is not allowed for types not implementingCopy
.How would you support such types?
What's the rationale behind wrapping the types exposed by
bindgen
?The text was updated successfully, but these errors were encountered: