Rust 1.85 (#25272)
Closes #ISSUE Release Notes: - N/A *or* Added/Fixed/Improved ... --------- Co-authored-by: Anthony Eid <hello@anthonyeid.me>
This commit is contained in:
co-authored by
Anthony Eid
parent
fc52b43159
commit
e4e758db3a
@@ -82,7 +82,7 @@ impl From<Rgba> for u32 {
|
||||
|
||||
struct RgbaVisitor;
|
||||
|
||||
impl<'de> Visitor<'de> for RgbaVisitor {
|
||||
impl Visitor<'_> for RgbaVisitor {
|
||||
type Value = Rgba;
|
||||
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
@@ -180,7 +180,7 @@ impl TryFrom<&'_ str> for Rgba {
|
||||
/// Duplicates a given hex digit.
|
||||
/// E.g., `0xf` -> `0xff`.
|
||||
const fn duplicate(value: u8) -> u8 {
|
||||
value << 4 | value
|
||||
(value << 4) | value
|
||||
}
|
||||
|
||||
(duplicate(r), duplicate(g), duplicate(b), duplicate(a))
|
||||
|
||||
Reference in New Issue
Block a user