diff options
author | 2023-10-27 03:58:45 +0200 | |
---|---|---|
committer | 2023-10-27 03:58:45 +0200 | |
commit | 65823875791ecebf24d049cc0782e7475a37899b (patch) | |
tree | 1088c656ef7ad9782374952045022d2c104931b2 /tiny_skia | |
parent | 8cc19de254c37d3123d5ea1b6513f1f34d35c7c8 (diff) | |
parent | f1b1344d59fa7354615f560bd25ed01ad0c9f865 (diff) | |
download | iced-65823875791ecebf24d049cc0782e7475a37899b.tar.gz iced-65823875791ecebf24d049cc0782e7475a37899b.tar.bz2 iced-65823875791ecebf24d049cc0782e7475a37899b.zip |
Merge branch 'master' into text-editor
Diffstat (limited to 'tiny_skia')
-rw-r--r-- | tiny_skia/src/backend.rs | 6 | ||||
-rw-r--r-- | tiny_skia/src/geometry.rs | 4 | ||||
-rw-r--r-- | tiny_skia/src/lib.rs | 12 | ||||
-rw-r--r-- | tiny_skia/src/vector.rs | 6 |
4 files changed, 8 insertions, 20 deletions
diff --git a/tiny_skia/src/backend.rs b/tiny_skia/src/backend.rs index 5f66dff2..3c6fe288 100644 --- a/tiny_skia/src/backend.rs +++ b/tiny_skia/src/backend.rs @@ -467,8 +467,7 @@ impl Backend { #[cfg(not(feature = "image"))] Primitive::Image { .. } => { log::warn!( - "Unsupported primitive in `iced_tiny_skia`: {:?}", - primitive + "Unsupported primitive in `iced_tiny_skia`: {primitive:?}", ); } #[cfg(feature = "svg")] @@ -497,8 +496,7 @@ impl Backend { #[cfg(not(feature = "svg"))] Primitive::Svg { .. } => { log::warn!( - "Unsupported primitive in `iced_tiny_skia`: {:?}", - primitive + "Unsupported primitive in `iced_tiny_skia`: {primitive:?}", ); } Primitive::Custom(primitive::Custom::Fill { diff --git a/tiny_skia/src/geometry.rs b/tiny_skia/src/geometry.rs index 047bc0ff..1d14aa03 100644 --- a/tiny_skia/src/geometry.rs +++ b/tiny_skia/src/geometry.rs @@ -180,9 +180,9 @@ 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().iter() { + for event in path.raw() { match event { lyon_path::Event::Begin { at } => { builder.move_to(at.x, at.y); diff --git a/tiny_skia/src/lib.rs b/tiny_skia/src/lib.rs index e48468e9..ec8012be 100644 --- a/tiny_skia/src/lib.rs +++ b/tiny_skia/src/lib.rs @@ -1,15 +1,5 @@ #![forbid(rust_2018_idioms)] -#![deny( - unsafe_code, - unused_results, - clippy::extra_unused_lifetimes, - clippy::from_over_into, - clippy::needless_borrow, - clippy::new_without_default, - clippy::useless_conversion, - rustdoc::broken_intra_doc_links -)] -#![allow(clippy::inherent_to_string, clippy::type_complexity)] +#![deny(unsafe_code, unused_results, rustdoc::broken_intra_doc_links)] #![cfg_attr(docsrs, feature(doc_auto_cfg))] pub mod window; 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); } } |