diff options
| author | fmoko <mokou@posteo.de> | 2020-11-12 16:36:50 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-12 16:36:50 +0100 |
| commit | 5aa467bef291a751f99d620484685933950c6971 (patch) | |
| tree | 1b1a732c78dd3db83d396a4f6aeb54474b65a18e /exercises | |
| parent | af7ad27f89d3e981076705cd7dd36ee0e6dcaaa6 (diff) | |
| parent | 4f4cfcf3c36c8718c7c170c9c3a6935e6ef0618c (diff) | |
Merge pull request #587 from wh5a/bugfix
fix(try_from_into): type error
Diffstat (limited to 'exercises')
| -rw-r--r-- | exercises/conversions/try_from_into.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/exercises/conversions/try_from_into.rs b/exercises/conversions/try_from_into.rs index 38ce2db..897b364 100644 --- a/exercises/conversions/try_from_into.rs +++ b/exercises/conversions/try_from_into.rs @@ -88,17 +88,17 @@ mod tests { } #[test] fn test_array_out_of_range_positive() { - let c: Color = [1000, 10000, 256].try_into(); + let c: Result<Color, String> = [1000, 10000, 256].try_into(); assert!(c.is_err()); } #[test] fn test_array_out_of_range_negative() { - let c: Color = [-10, -256, -1].try_into(); + let c: Result<Color, String> = [-10, -256, -1].try_into(); assert!(c.is_err()); } #[test] fn test_array_sum() { - let c: Color = [-1, 255, 255].try_into(); + let c: Result<Color, String> = [-1, 255, 255].try_into(); assert!(c.is_err()); } #[test] |
