As discussed in Is it documented that Cargo can download and bundle multiple versions of the same crate?, it's possible for Cargo to pull in multiple versions of the same crate for a single program. How do I access both of these versions concurrently?
相关问题
- Share Arc between closures
- Function references: expected bound lifetime param
- Pattern matching on slices
- How can I iteratively call Sha256::digest, passing
- Destructure a vector into variables and give away
相关文章
- How can I convert a f64 to f32 and get the closest
- What is a good way of cleaning up after a unit tes
- How can I unpack (destructure) elements from a vec
- How to import macros in Rust?
- How to get struct field names in Rust? [duplicate]
- Confusion between [T] and &[T]
- How do I initialize an opaque C struct when using
- What's the most idiomatic way to test two Opti
As of Rust 1.31, you can use the rename-dependency Cargo feature:
You can choose whatever name you want for the key. The
package
attribute needs to be the official name of the crate.Within your code, you can access version 0.1.x using the crate name
futures_01
, and version 0.3.x viafutures_03
.See also: