summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-10-27 03:58:45 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-10-27 03:58:45 +0200
commit65823875791ecebf24d049cc0782e7475a37899b (patch)
tree1088c656ef7ad9782374952045022d2c104931b2 /graphics
parent8cc19de254c37d3123d5ea1b6513f1f34d35c7c8 (diff)
parentf1b1344d59fa7354615f560bd25ed01ad0c9f865 (diff)
downloadiced-65823875791ecebf24d049cc0782e7475a37899b.tar.gz
iced-65823875791ecebf24d049cc0782e7475a37899b.tar.bz2
iced-65823875791ecebf24d049cc0782e7475a37899b.zip
Merge branch 'master' into text-editor
Diffstat (limited to 'graphics')
-rw-r--r--graphics/src/compositor.rs2
-rw-r--r--graphics/src/geometry/path/builder.rs2
-rw-r--r--graphics/src/gradient.rs4
-rw-r--r--graphics/src/image.rs2
-rw-r--r--graphics/src/lib.rs6
-rw-r--r--graphics/src/renderer.rs4
6 files changed, 7 insertions, 13 deletions
diff --git a/graphics/src/compositor.rs b/graphics/src/compositor.rs
index 7173ffa7..0222a80f 100644
--- a/graphics/src/compositor.rs
+++ b/graphics/src/compositor.rs
@@ -61,7 +61,7 @@ pub trait Compositor: Sized {
) -> Result<(), SurfaceError>;
/// Screenshots the current [`Renderer`] primitives to an offscreen texture, and returns the bytes of
- /// the texture ordered as `RGBA` in the sRGB color space.
+ /// the texture ordered as `RGBA` in the `sRGB` color space.
///
/// [`Renderer`]: Self::Renderer
fn screenshot<T: AsRef<str>>(
diff --git a/graphics/src/geometry/path/builder.rs b/graphics/src/geometry/path/builder.rs
index 794dd3bc..b0959fbf 100644
--- a/graphics/src/geometry/path/builder.rs
+++ b/graphics/src/geometry/path/builder.rs
@@ -174,7 +174,7 @@ impl Builder {
/// the starting point.
#[inline]
pub fn close(&mut self) {
- self.raw.close()
+ self.raw.close();
}
/// Builds the [`Path`] of this [`Builder`].
diff --git a/graphics/src/gradient.rs b/graphics/src/gradient.rs
index b274ec86..603f1b4a 100644
--- a/graphics/src/gradient.rs
+++ b/graphics/src/gradient.rs
@@ -87,8 +87,8 @@ impl Linear {
mut self,
stops: impl IntoIterator<Item = ColorStop>,
) -> Self {
- for stop in stops.into_iter() {
- self = self.add_stop(stop.offset, stop.color)
+ for stop in stops {
+ self = self.add_stop(stop.offset, stop.color);
}
self
diff --git a/graphics/src/image.rs b/graphics/src/image.rs
index 6b43f4a8..d89caace 100644
--- a/graphics/src/image.rs
+++ b/graphics/src/image.rs
@@ -79,7 +79,7 @@ impl Operation {
use image::imageops;
if self.contains(Self::FLIP_DIAGONALLY) {
- imageops::flip_vertical_in_place(&mut image)
+ imageops::flip_vertical_in_place(&mut image);
}
if self.contains(Self::ROTATE_180) {
diff --git a/graphics/src/lib.rs b/graphics/src/lib.rs
index 01a358ca..a0729058 100644
--- a/graphics/src/lib.rs
+++ b/graphics/src/lib.rs
@@ -13,14 +13,8 @@
//missing_docs,
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)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
mod antialiasing;
mod error;
diff --git a/graphics/src/renderer.rs b/graphics/src/renderer.rs
index 9b699183..93fff3b7 100644
--- a/graphics/src/renderer.rs
+++ b/graphics/src/renderer.rs
@@ -216,7 +216,7 @@ where
}
fn draw(&mut self, handle: image::Handle, bounds: Rectangle) {
- self.primitives.push(Primitive::Image { handle, bounds })
+ self.primitives.push(Primitive::Image { handle, bounds });
}
}
@@ -238,6 +238,6 @@ where
handle,
color,
bounds,
- })
+ });
}
}