Merge branch 'master' into feature/test-recorder
This commit is contained in:
commit
e2df674aa5
9 changed files with 26 additions and 25 deletions
|
|
@ -11,7 +11,7 @@ pub fn from_rgba(
|
|||
) -> Result<Icon, Error> {
|
||||
const PIXEL_SIZE: usize = mem::size_of::<u8>() * 4;
|
||||
|
||||
if rgba.len() % PIXEL_SIZE != 0 {
|
||||
if !rgba.len().is_multiple_of(PIXEL_SIZE) {
|
||||
return Err(Error::ByteCountNotDivisibleBy4 {
|
||||
byte_count: rgba.len(),
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue