diff --git a/vello/src/lib.rs b/vello/src/lib.rs index 16980016..67a145ee 100644 --- a/vello/src/lib.rs +++ b/vello/src/lib.rs @@ -101,7 +101,6 @@ single_use_lifetimes, unnameable_types, unreachable_pub, - clippy::return_self_not_must_use, clippy::cast_possible_truncation, clippy::missing_assert_message, clippy::shadow_unrelated, diff --git a/vello/src/scene.rs b/vello/src/scene.rs index e7614599..d5322837 100644 --- a/vello/src/scene.rs +++ b/vello/src/scene.rs @@ -369,6 +369,7 @@ impl<'a> DrawGlyphs<'a> { /// translation. /// /// The default value is the identity matrix. + #[must_use] pub fn transform(mut self, transform: Affine) -> Self { self.run.transform = Transform::from_kurbo(&transform); self @@ -379,6 +380,7 @@ impl<'a> DrawGlyphs<'a> { /// an oblique font. /// /// The default value is `None`. + #[must_use] pub fn glyph_transform(mut self, transform: Option) -> Self { self.run.glyph_transform = transform.map(|xform| Transform::from_kurbo(&xform)); self @@ -387,6 +389,7 @@ impl<'a> DrawGlyphs<'a> { /// Sets the font size in pixels per em units. /// /// The default value is 16.0. + #[must_use] pub fn font_size(mut self, size: f32) -> Self { self.run.font_size = size; self @@ -395,12 +398,14 @@ impl<'a> DrawGlyphs<'a> { /// Sets whether to enable hinting. /// /// The default value is `false`. + #[must_use] pub fn hint(mut self, hint: bool) -> Self { self.run.hint = hint; self } /// Sets the normalized design space coordinates for a variable font instance. + #[must_use] pub fn normalized_coords(mut self, coords: &[NormalizedCoord]) -> Self { self.scene .encoding @@ -419,6 +424,7 @@ impl<'a> DrawGlyphs<'a> { /// Sets the brush. /// /// The default value is solid black. + #[must_use] pub fn brush(mut self, brush: impl Into>) -> Self { self.brush = brush.into(); self @@ -427,6 +433,7 @@ impl<'a> DrawGlyphs<'a> { /// Sets an additional alpha multiplier for the brush. /// /// The default value is 1.0. + #[must_use] pub fn brush_alpha(mut self, alpha: f32) -> Self { self.brush_alpha = alpha; self diff --git a/vello_encoding/src/clip.rs b/vello_encoding/src/clip.rs index 228d7acf..d7b15058 100644 --- a/vello_encoding/src/clip.rs +++ b/vello_encoding/src/clip.rs @@ -65,6 +65,7 @@ impl ClipBic { /// operation, it represents doing the pops of `self`, the pushes of /// `self`, the pops of `other`, and the pushes of `other`. The middle /// two can cancel each other out. + #[must_use] pub fn combine(self, other: Self) -> Self { let m = self.b.min(other.a); Self::new(self.a + other.a - m, self.b + other.b - m) diff --git a/vello_encoding/src/lib.rs b/vello_encoding/src/lib.rs index af919786..0c63b1f5 100644 --- a/vello_encoding/src/lib.rs +++ b/vello_encoding/src/lib.rs @@ -21,7 +21,6 @@ #![expect( missing_debug_implementations, single_use_lifetimes, - clippy::return_self_not_must_use, clippy::cast_possible_truncation, clippy::missing_assert_message, clippy::missing_panics_doc, diff --git a/vello_encoding/src/monoid.rs b/vello_encoding/src/monoid.rs index 7ca48bd3..99d9477b 100644 --- a/vello_encoding/src/monoid.rs +++ b/vello_encoding/src/monoid.rs @@ -11,5 +11,6 @@ pub trait Monoid: Default { fn new(value: Self::SourceValue) -> Self; /// Combines two monoids. This operation must be associative. + #[must_use] fn combine(&self, other: &Self) -> Self; }