Skip to content

Commit 36319a6

Browse files
committed
Fix clippy lints 🎉
1 parent e3e2d1f commit 36319a6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,8 @@ impl<F: Font + Sync, H: BuildHasher> GlyphBrush<wgpu::DepthStencilState, F, H> {
459459
}
460460

461461
/// Helper function to generate a generate a transform matrix.
462+
#[rustfmt::skip]
462463
pub fn orthographic_projection(width: u32, height: u32) -> [f32; 16] {
463-
#[cfg_attr(rustfmt, rustfmt_skip)]
464464
[
465465
2.0 / width as f32, 0.0, 0.0, 0.0,
466466
0.0, -2.0 / height as f32, 0.0, 0.0,

src/pipeline.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ impl<Depth> Pipeline<Depth> {
184184
}
185185

186186
// Helpers
187-
#[cfg_attr(rustfmt, rustfmt_skip)]
187+
#[rustfmt::skip]
188188
const IDENTITY_MATRIX: [f32; 16] = [
189189
1.0, 0.0, 0.0, 0.0,
190190
0.0, 1.0, 0.0, 0.0,
@@ -424,7 +424,7 @@ fn create_uniforms(
424424
) -> wgpu::BindGroup {
425425
device.create_bind_group(&wgpu::BindGroupDescriptor {
426426
label: Some("wgpu_glyph::Pipeline uniforms"),
427-
layout: layout,
427+
layout,
428428
entries: &[
429429
wgpu::BindGroupEntry {
430430
binding: 0,
@@ -470,8 +470,8 @@ impl Instance {
470470
let gl_bounds = bounds;
471471

472472
let mut gl_rect = Rect {
473-
min: point(pixel_coords.min.x as f32, pixel_coords.min.y as f32),
474-
max: point(pixel_coords.max.x as f32, pixel_coords.max.y as f32),
473+
min: point(pixel_coords.min.x, pixel_coords.min.y),
474+
max: point(pixel_coords.max.x, pixel_coords.max.y),
475475
};
476476

477477
// handle overlapping bounds, modify uv_rect to preserve texture aspect

0 commit comments

Comments
 (0)