mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-20 03:18:06 +08:00
Fix a lot of Clippy warnings (#1808)
* fix a lot of clippy warnings * fix more clippy warnings * fix yet more clippy warnings * bump msrv to 1.70.0 to silence warnings * fix a lot of clippy warnings * fix more clippy warnings * fix yet more clippy warnings * fix a few more warnings * fix a clippy warning * remove a commented out line * silense too many arguments error * fix more clippy warnings * prefix underscore to unused vars/functions to fix warnings * use filter instead of map * move raw-rs-tests feature flat to module level to fix unused imports warnings * fix a couple of unused result warnings --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
@@ -69,12 +69,12 @@ impl ScrollDelta {
|
||||
}
|
||||
|
||||
pub fn as_dvec2(&self) -> DVec2 {
|
||||
DVec2::new(self.x as f64, self.y as f64)
|
||||
DVec2::new(self.x, self.y)
|
||||
}
|
||||
|
||||
pub fn scroll_delta(&self) -> f64 {
|
||||
let (dx, dy) = (self.x, self.y);
|
||||
dy.signum() as f64 * ((dy * dy + f64::min(dy.abs(), dx.abs()).powi(2)) as f64).sqrt()
|
||||
dy.signum() * (dy * dy + f64::min(dy.abs(), dx.abs()).powi(2)).sqrt()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -105,6 +105,12 @@ impl KeyMappingEntries {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for KeyMappingEntries {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Clone, Debug)]
|
||||
pub struct MappingEntry {
|
||||
/// Serves two purposes:
|
||||
|
||||
Reference in New Issue
Block a user