Skip to content

Commit cef5990

Browse files
joaoantoniocardosopatrickelectric
authored andcommitted
cargo: Add enum-iterator to prevent 1.2.0 from being used.
`enum-iterator` is a dependency for `vergen`, but because `v1.2.0` is causing the `error[E0658]`, we are restricting its version by defining it as `~1.1.3` here. To give more context, until we've added tracing, vergen v1.1.3 had been chosen by cargo. With tracing, if we use any version for vergen equal or greater than v7.0.0, cargo jumps enum-iterator from v0.8.1 to v1.2.0, which will cause an error when building in the CI: error[E0658]: use of unstable library feature 'array_from_fn' --> /root/.cargo/registry/src/github.com-1285ae84e5963aae/enum-iterator-1.2.0/src/lib.rs:554:18 | 554 | Some(core::array::from_fn(|_| unreachable!())) | ^^^^^^^^^^^^^^^^^^^^ | = note: see issue #89379 <rust-lang/rust#89379> for more information By adding `enum-iterator = "~1.1.3"`, we are giving v1.1.3 preference over the latest version (v1.2.0), so the build is fixed.
1 parent 50efd4e commit cef5990

File tree

2 files changed

+31
-30
lines changed

2 files changed

+31
-30
lines changed

Diff for: Cargo.lock

+30-30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ rand = "0.8.5"
7575
[build-dependencies]
7676
reqwest = { version = "0.11.11", features = ["blocking"] }
7777
vergen = { version = "7.3.1", default-features = false, features = ["build", "git"] }
78+
enum-iterator = "~1.1.3" # `enum-iterator` is a dependency for `vergen`, but because `v1.2.0` is causing the `error[E0658]`, we are restricting its version by defining it as `~1.1.3` here.
7879

7980
[features]
8081
default = ["rtsp"]

0 commit comments

Comments
 (0)