summaryrefslogtreecommitdiffstats
path: root/tiny_skia/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2023-09-20 15:52:41 +0200
committerLibravatar GitHub <noreply@github.com>2023-09-20 15:52:41 +0200
commit2f7ff1471d1f6119c769c77fa138a63e95b5d881 (patch)
tree83f20609fa20d534ef8bd32b3851cae03cbadbb2 /tiny_skia/src
parente8b01eb5435500c4b4d3135dde3d9e5910aca89e (diff)
parent33d780f691829ecd32f3a218008fcb40e005deb4 (diff)
downloadiced-2f7ff1471d1f6119c769c77fa138a63e95b5d881.tar.gz
iced-2f7ff1471d1f6119c769c77fa138a63e95b5d881.tar.bz2
iced-2f7ff1471d1f6119c769c77fa138a63e95b5d881.zip
Merge pull request #2096 from iced-rs/fix/some-more-lints
Fix some `clippy::pedantic` lints
Diffstat (limited to 'tiny_skia/src')
-rw-r--r--tiny_skia/src/geometry.rs2
-rw-r--r--tiny_skia/src/vector.rs6
2 files changed, 4 insertions, 4 deletions
diff --git a/tiny_skia/src/geometry.rs b/tiny_skia/src/geometry.rs
index 1d573f6a..1d14aa03 100644
--- a/tiny_skia/src/geometry.rs
+++ b/tiny_skia/src/geometry.rs
@@ -180,7 +180,7 @@ fn convert_path(path: &Path) -> Option<tiny_skia::Path> {
use iced_graphics::geometry::path::lyon_path;
let mut builder = tiny_skia::PathBuilder::new();
- let mut last_point = Default::default();
+ let mut last_point = lyon_path::math::Point::default();
for event in path.raw() {
match event {
diff --git a/tiny_skia/src/vector.rs b/tiny_skia/src/vector.rs
index 490b9f69..a1cd269d 100644
--- a/tiny_skia/src/vector.rs
+++ b/tiny_skia/src/vector.rs
@@ -172,9 +172,9 @@ impl Cache {
for pixel in
bytemuck::cast_slice_mut::<u8, u32>(image.data_mut())
{
- *pixel = *pixel & 0xFF00FF00
- | ((0x000000FF & *pixel) << 16)
- | ((0x00FF0000 & *pixel) >> 16);
+ *pixel = *pixel & 0xFF00_FF00
+ | ((0x0000_00FF & *pixel) << 16)
+ | ((0x00FF_0000 & *pixel) >> 16);
}
}