From 4486c4324cd68b72e210efad5809abd33fa2bdf0 Mon Sep 17 00:00:00 2001 From: Lucas Jansen <7199136+staticintlucas@users.noreply.github.com> Date: Tue, 2 Jan 2024 23:32:11 +0000 Subject: [PATCH] Fix clippy warnings for keyset-drawing with no output format enabled --- keyset-drawing/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/keyset-drawing/src/lib.rs b/keyset-drawing/src/lib.rs index 0d77946..eb46902 100644 --- a/keyset-drawing/src/lib.rs +++ b/keyset-drawing/src/lib.rs @@ -27,12 +27,14 @@ use geom::{Point, Rect, Size}; use key::Key; use profile::Profile; +#[allow(unused_imports)] // Path is unused if no format is enabled, but who would do that? pub(crate) use imp::{KeyDrawing, Path}; #[derive(Debug, Clone)] +#[allow(dead_code)] // Struct fields are unused if no format is enabled, but who would do that? pub struct Drawing { bounds: Rect, - keys: Vec, + keys: Vec, scale: f64, } @@ -49,7 +51,7 @@ impl Drawing { let keys = keys .iter() - .map(|key| imp::KeyDrawing::new(key, options)) + .map(|key| KeyDrawing::new(key, options)) .collect(); Self {