1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2024-09-29 15:31:23 +02:00

Merge pull request #587 from wh5a/bugfix

fix(try_from_into): type error
This commit is contained in:
fmoko 2020-11-12 16:36:50 +01:00 committed by GitHub
commit 5aa467bef2
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

@ -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]