diff options
Diffstat (limited to 'tiny_skia/src')
| -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);                  }              } | 
