mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-28 08:16:29 +00:00
fix(try_from_into): type error
This commit is contained in:
parent
fa9f522b7f
commit
4f4cfcf3c3
1 changed files with 3 additions and 3 deletions
|
@ -88,17 +88,17 @@ mod tests {
|
||||||
}
|
}
|
||||||
#[test]
|
#[test]
|
||||||
fn test_array_out_of_range_positive() {
|
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());
|
assert!(c.is_err());
|
||||||
}
|
}
|
||||||
#[test]
|
#[test]
|
||||||
fn test_array_out_of_range_negative() {
|
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());
|
assert!(c.is_err());
|
||||||
}
|
}
|
||||||
#[test]
|
#[test]
|
||||||
fn test_array_sum() {
|
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());
|
assert!(c.is_err());
|
||||||
}
|
}
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Reference in a new issue