parent
9334783da3
commit
96347df9df
@ -15,12 +15,12 @@ struct Color {
|
|||||||
|
|
||||||
// Your task is to complete this implementation
|
// Your task is to complete this implementation
|
||||||
// and return an Ok result of inner type Color.
|
// and return an Ok result of inner type Color.
|
||||||
// You need create implementation for a tuple of three integer,
|
// You need to create an implementation for a tuple of three integers,
|
||||||
// an array of three integer and slice of integer.
|
// an array of three integers and a slice of integers.
|
||||||
//
|
//
|
||||||
// Note, that implementation for tuple and array will be checked at compile-time,
|
// Note that the implementation for tuple and array will be checked at compile time,
|
||||||
// but slice implementation need check slice length!
|
// but the slice implementation needs to check the slice length!
|
||||||
// Also note, that chunk of correct rgb color must be integer in range 0..=255.
|
// Also note that correct RGB color values must be integers in the 0..=255 range.
|
||||||
|
|
||||||
// Tuple implementation
|
// Tuple implementation
|
||||||
impl TryFrom<(i16, i16, i16)> for Color {
|
impl TryFrom<(i16, i16, i16)> for Color {
|
||||||
|
Reference in New Issue
Block a user