Skip to content

Commit

Permalink
resistor-color: Use enum-iterator 1.2.0, up from 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-tihon authored and petertseng committed Oct 11, 2022
1 parent d248051 commit bd89c52
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion exercises/concept/resistor-color/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The goal of this exercise is to create a way:
- to convert the numerical value into a string representing color
- to list the different band colors

For task number one, you will need the external crate [`int-enum`](https://docs.rs/int-enum/0.5.0/int_enum/) and for task number three, you'll need [`enum-iterator`](https://docs.rs/enum-iterator/1.1.1/enum_iterator/).
For task number one, you will need the external crate [`int-enum`](https://docs.rs/int-enum/0.5.0/int_enum/) and for task number three, you'll need [`enum-iterator`](https://docs.rs/enum-iterator/1.2.0/enum_iterator/).
They're both already included in this exercise's `Cargo.toml`.
Be sure to check the crates' documentation to learn how to use them.
You can look into the default implementation of the Debug trait for Enums to complete task number two.
Expand Down
2 changes: 1 addition & 1 deletion exercises/concept/resistor-color/.docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ You will often see external packages being referred to as "crates" in Rust. A cr

Most of the time, adding an external dependency is as simple as adding a line to your `Cargo.toml` file.

In this exercise, [`enum-iterator`](https://docs.rs/enum-iterator/1.1.1/enum_iterator/) and [`int-enum`](https://docs.rs/int-enum/0.5.0/int_enum/) dependencies were added for you.
In this exercise, [`enum-iterator`](https://docs.rs/enum-iterator/1.2.0/enum_iterator/) and [`int-enum`](https://docs.rs/int-enum/0.5.0/int_enum/) dependencies were added for you.
2 changes: 1 addition & 1 deletion exercises/concept/resistor-color/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ version = "1.0.0"

[dependencies]
int-enum = "0.5.0"
enum-iterator = "1.1.1"
enum-iterator = "1.2.0"

3 comments on commit bd89c52

@coding-by-sea
Copy link

@coding-by-sea coding-by-sea commented on bd89c52 Nov 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.2.0 version gives the error below. 1.1.1 builds fine.

error[E0658]: use of unstable library feature 'array_from_fn'
--> /Users/hangwang/.cargo/registry/src/github.com-1ecc6299db9ec823/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

@petertseng
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to get 1.2.0 to fail with that same error, and https://github.com/exercism/rust/actions/runs/3453041531 doesn't have an error either. Does it only happen under some conditions, and if so can you describe the conditions that cause this error?

@zvonkok
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the same error as @hang-onlyalt , @petertseng I have the following environment:

exercism/rust/resistor-color is πŸ“¦ v1.0.0 via πŸ¦€ v1.61.0 
❯ rustc  -V
rustc 1.61.0 (fe5b13d68 2022-05-18)

exercism/rust/resistor-color is πŸ“¦ v1.0.0 via πŸ¦€ v1.61.0 
❯ cat Cargo.toml 
[package]
edition = "2021"
name = "resistor-color"
version = "1.0.0"

[dependencies]
int-enum = "0.5.0"
enum-iterator = "1.2.0"

Please sign in to comment.