Reformat code with latest cargo fmt

This commit is contained in:
Zhiming Wang
2020-06-02 17:54:31 +08:00
parent fdea9d77e7
commit 307f52c002
11 changed files with 46 additions and 27 deletions

View File

@ -399,19 +399,27 @@ unsafe impl Component for (u8, u8, u8) {
unsafe impl Component for [u8; 4] {
#[inline(always)]
fn is_valid(format: format::Pixel) -> bool {
format == format::Pixel::RGBA || format == format::Pixel::BGRA
|| format == format::Pixel::ARGB || format == format::Pixel::ABGR
|| format == format::Pixel::RGBZ || format == format::Pixel::BGRZ
|| format == format::Pixel::ZRGB || format == format::Pixel::ZBGR
format == format::Pixel::RGBA
|| format == format::Pixel::BGRA
|| format == format::Pixel::ARGB
|| format == format::Pixel::ABGR
|| format == format::Pixel::RGBZ
|| format == format::Pixel::BGRZ
|| format == format::Pixel::ZRGB
|| format == format::Pixel::ZBGR
}
}
unsafe impl Component for (u8, u8, u8, u8) {
#[inline(always)]
fn is_valid(format: format::Pixel) -> bool {
format == format::Pixel::RGBA || format == format::Pixel::BGRA
|| format == format::Pixel::ARGB || format == format::Pixel::ABGR
|| format == format::Pixel::RGBZ || format == format::Pixel::BGRZ
|| format == format::Pixel::ZRGB || format == format::Pixel::ZBGR
format == format::Pixel::RGBA
|| format == format::Pixel::BGRA
|| format == format::Pixel::ARGB
|| format == format::Pixel::ABGR
|| format == format::Pixel::RGBZ
|| format == format::Pixel::BGRZ
|| format == format::Pixel::ZRGB
|| format == format::Pixel::ZBGR
}
}