mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-24 09:38:32 +02:00
refactor(clippy): apply all super pedantic lints
Realised that I hadn't turned on super pedantic mode for clippy in the komorebi-core and komorebic crates. This commit ensures the same clippy config across all crates and applies the lint suggestions that arose as a result of turning on the same config everywhere.
This commit is contained in:
@@ -12,7 +12,7 @@ pub struct Rect {
|
||||
|
||||
impl Default for Rect {
|
||||
fn default() -> Self {
|
||||
Rect {
|
||||
Self {
|
||||
left: 0,
|
||||
top: 0,
|
||||
right: 0,
|
||||
@@ -23,7 +23,7 @@ impl Default for Rect {
|
||||
|
||||
impl From<RECT> for Rect {
|
||||
fn from(rect: RECT) -> Self {
|
||||
Rect {
|
||||
Self {
|
||||
left: rect.left,
|
||||
top: rect.top,
|
||||
right: rect.right - rect.left,
|
||||
@@ -42,7 +42,8 @@ impl Rect {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn contains_point(&self, point: (i32, i32)) -> bool {
|
||||
#[must_use]
|
||||
pub const fn contains_point(&self, point: (i32, i32)) -> bool {
|
||||
point.0 >= self.left
|
||||
&& point.0 <= self.left + self.right
|
||||
&& point.1 >= self.top
|
||||
|
||||
Reference in New Issue
Block a user