Skip to content

Commit

Permalink
Fix clippy::precedence lint (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored Jan 2, 2025
1 parent db12a36 commit 6378688
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion color/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,12 @@ const fn hex_from_ascii_byte(b: u8) -> Result<u8, ()> {

const fn color_from_4bit_hex(components: [u8; 8]) -> AlphaColor<Srgb> {
let [r0, r1, g0, g1, b0, b1, a0, a1] = components;
AlphaColor::from_rgba8(r0 << 4 | r1, g0 << 4 | g1, b0 << 4 | b1, a0 << 4 | a1)
AlphaColor::from_rgba8(
(r0 << 4) | r1,
(g0 << 4) | g1,
(b0 << 4) | b1,
(a0 << 4) | a1,
)
}

impl FromStr for ColorSpaceTag {
Expand Down

0 comments on commit 6378688

Please sign in to comment.