We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d28f03 commit db22ac6Copy full SHA for db22ac6
2 files changed
exercises/concept/resistor-color/.meta/exemplar.rs
@@ -17,11 +17,11 @@ pub enum ResistorColor {
17
}
18
19
pub fn color_to_value(color: ResistorColor) -> usize {
20
- color.int_value()
+ color.into()
21
22
23
pub fn value_to_color_string(value: usize) -> String {
24
- ResistorColor::from_int(value)
+ ResistorColor::try_from(value)
25
.map(|color| format!("{color:?}"))
26
.unwrap_or_else(|_| "value out of range".into())
27
exercises/concept/resistor-color/Cargo.toml
@@ -7,5 +7,5 @@ edition = "2024"
7
# The full list of available libraries is here:
8
# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml
9
[dependencies]
10
-int-enum = "0.5.0"
11
-enum-iterator = "1.2.0"
+enum-iterator = "2.0"
+int-enum = "1.0"
0 commit comments