Skip to content

Commit db22ac6

Browse files
authored
resistor-color: update dependencies (#2056)
1 parent 9d28f03 commit db22ac6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

exercises/concept/resistor-color/.meta/exemplar.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ pub enum ResistorColor {
1717
}
1818

1919
pub fn color_to_value(color: ResistorColor) -> usize {
20-
color.int_value()
20+
color.into()
2121
}
2222

2323
pub fn value_to_color_string(value: usize) -> String {
24-
ResistorColor::from_int(value)
24+
ResistorColor::try_from(value)
2525
.map(|color| format!("{color:?}"))
2626
.unwrap_or_else(|_| "value out of range".into())
2727
}

exercises/concept/resistor-color/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ edition = "2024"
77
# The full list of available libraries is here:
88
# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml
99
[dependencies]
10-
int-enum = "0.5.0"
11-
enum-iterator = "1.2.0"
10+
enum-iterator = "2.0"
11+
int-enum = "1.0"

0 commit comments

Comments
 (0)