Skip to content

Commit

Permalink
fix(try_from_into): type error
Browse files Browse the repository at this point in the history
  • Loading branch information
Wei Hu committed Nov 12, 2020
1 parent fa9f522 commit 4f4cfcf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions exercises/conversions/try_from_into.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 4f4cfcf

Please sign in to comment.