Skip to content

Commit 5aa467b

Browse files
author
fmoko
authored
Merge pull request #587 from wh5a/bugfix
fix(try_from_into): type error
2 parents af7ad27 + 4f4cfcf commit 5aa467b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

exercises/conversions/try_from_into.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,17 @@ mod tests {
8888
}
8989
#[test]
9090
fn test_array_out_of_range_positive() {
91-
let c: Color = [1000, 10000, 256].try_into();
91+
let c: Result<Color, String> = [1000, 10000, 256].try_into();
9292
assert!(c.is_err());
9393
}
9494
#[test]
9595
fn test_array_out_of_range_negative() {
96-
let c: Color = [-10, -256, -1].try_into();
96+
let c: Result<Color, String> = [-10, -256, -1].try_into();
9797
assert!(c.is_err());
9898
}
9999
#[test]
100100
fn test_array_sum() {
101-
let c: Color = [-1, 255, 255].try_into();
101+
let c: Result<Color, String> = [-1, 255, 255].try_into();
102102
assert!(c.is_err());
103103
}
104104
#[test]

0 commit comments

Comments
 (0)