Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
pragmatrix committed Jun 21, 2024
1 parent ac61efa commit 1388286
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
7 changes: 1 addition & 6 deletions geometry/src/cubic_bezier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,7 @@ impl CubicBezier {
// this way users get finer grained control over the angles at the ends.
let mut distribution_factor = (t - (1.0 / 3.0)) * 3.0;

if distribution_factor < 0.0 {
distribution_factor = 0.0;
}
if distribution_factor > 1.0 {
distribution_factor = 1.0;
}
distribution_factor = distribution_factor.clamp(0.0, 1.0);

let influence_factor1 = 1.0 - distribution_factor;
let influence_factor2 = distribution_factor;
Expand Down
3 changes: 0 additions & 3 deletions renderer/src/glyph/glyph_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use text::SwashContent;
use super::{glyph_param::GlyphRasterizationParam, glyph_rasterization::render_sdf};
use crate::{
glyph::glyph_rasterization::{pad_image, rasterize_glyph},
primitives::Pipeline,
texture,
};

Expand Down Expand Up @@ -57,7 +56,6 @@ pub struct RasterizedGlyphKey {
#[derive(Debug)]
pub struct RenderGlyph {
pub placement: text::Placement,
pub pipeline: Pipeline,
pub texture_view: texture::View,
}

Expand All @@ -83,7 +81,6 @@ fn render_glyph(
image_to_gpu_texture(device, queue, &image, key.param.prefer_sdf).ok()?;
Some(RenderGlyph {
placement,
pipeline: key.param.pipeline(),
texture_view,
})
}
Expand Down
3 changes: 0 additions & 3 deletions shell/shared/src/application2.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
use std::collections::HashMap;

use anyhow::Result;
use massive_geometry::{Matrix4, PointI, SizeI};
use winit::{
event::{
DeviceId, ElementState, KeyEvent, Modifiers, MouseButton, MouseScrollDelta, TouchPhase,
WindowEvent,
},
event_loop::EventLoop,
keyboard::{Key, NamedKey},
window::Window,
};

enum ActiveGesture {
Expand Down

0 comments on commit 1388286

Please sign in to comment.