Fix clippy::unreadable_literal
This commit is contained in:
parent
1e4bade53a
commit
14ba939e67
3 changed files with 15 additions and 10 deletions
|
|
@ -6,7 +6,7 @@ clippy --workspace --no-deps -- \
|
||||||
-D clippy::trivially-copy-pass-by-ref \
|
-D clippy::trivially-copy-pass-by-ref \
|
||||||
-D clippy::default_trait_access \
|
-D clippy::default_trait_access \
|
||||||
-D clippy::match-wildcard-for-single-variants \
|
-D clippy::match-wildcard-for-single-variants \
|
||||||
-D clippy::redundant-closure-for-method-calls
|
-D clippy::redundant-closure-for-method-calls \
|
||||||
"""
|
"""
|
||||||
|
|
||||||
nitpick = """
|
nitpick = """
|
||||||
|
|
@ -30,5 +30,10 @@ clippy --workspace --no-deps -- \
|
||||||
-A clippy::if_not_else \
|
-A clippy::if_not_else \
|
||||||
-A clippy::redundant_else \
|
-A clippy::redundant_else \
|
||||||
-A clippy::used_underscore_binding \
|
-A clippy::used_underscore_binding \
|
||||||
-A clippy::cast_possible_wrap
|
-A clippy::cast_possible_wrap \
|
||||||
|
-A clippy::unnecessary_wraps \
|
||||||
|
-A clippy::struct-excessive-bools \
|
||||||
|
-A clippy::float-cmp \
|
||||||
|
-A clippy::single_match_else \
|
||||||
|
-A clippy::unreadable_literal
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -172,9 +172,9 @@ impl Cache {
|
||||||
for pixel in
|
for pixel in
|
||||||
bytemuck::cast_slice_mut::<u8, u32>(image.data_mut())
|
bytemuck::cast_slice_mut::<u8, u32>(image.data_mut())
|
||||||
{
|
{
|
||||||
*pixel = *pixel & 0xFF00FF00
|
*pixel = *pixel & 0xFF00_FF00
|
||||||
| ((0x000000FF & *pixel) << 16)
|
| ((0x0000_00FF & *pixel) << 16)
|
||||||
| ((0x00FF0000 & *pixel) >> 16);
|
| ((0x00FF_0000 & *pixel) >> 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -329,12 +329,12 @@ impl Pipeline {
|
||||||
|
|
||||||
fn fragment_target(
|
fn fragment_target(
|
||||||
texture_format: wgpu::TextureFormat,
|
texture_format: wgpu::TextureFormat,
|
||||||
) -> Option<wgpu::ColorTargetState> {
|
) -> wgpu::ColorTargetState {
|
||||||
Some(wgpu::ColorTargetState {
|
wgpu::ColorTargetState {
|
||||||
format: texture_format,
|
format: texture_format,
|
||||||
blend: Some(wgpu::BlendState::ALPHA_BLENDING),
|
blend: Some(wgpu::BlendState::ALPHA_BLENDING),
|
||||||
write_mask: wgpu::ColorWrites::ALL,
|
write_mask: wgpu::ColorWrites::ALL,
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn primitive_state() -> wgpu::PrimitiveState {
|
fn primitive_state() -> wgpu::PrimitiveState {
|
||||||
|
|
@ -521,7 +521,7 @@ mod solid {
|
||||||
fragment: Some(wgpu::FragmentState {
|
fragment: Some(wgpu::FragmentState {
|
||||||
module: &shader,
|
module: &shader,
|
||||||
entry_point: "solid_fs_main",
|
entry_point: "solid_fs_main",
|
||||||
targets: &[triangle::fragment_target(format)],
|
targets: &[Some(triangle::fragment_target(format))],
|
||||||
}),
|
}),
|
||||||
primitive: triangle::primitive_state(),
|
primitive: triangle::primitive_state(),
|
||||||
depth_stencil: None,
|
depth_stencil: None,
|
||||||
|
|
@ -698,7 +698,7 @@ mod gradient {
|
||||||
fragment: Some(wgpu::FragmentState {
|
fragment: Some(wgpu::FragmentState {
|
||||||
module: &shader,
|
module: &shader,
|
||||||
entry_point: "gradient_fs_main",
|
entry_point: "gradient_fs_main",
|
||||||
targets: &[triangle::fragment_target(format)],
|
targets: &[Some(triangle::fragment_target(format))],
|
||||||
}),
|
}),
|
||||||
primitive: triangle::primitive_state(),
|
primitive: triangle::primitive_state(),
|
||||||
depth_stencil: None,
|
depth_stencil: None,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue