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:
LGUG2Z
2021-08-20 13:26:14 -07:00
parent 1625ca6e5d
commit 292bdb282f
9 changed files with 115 additions and 126 deletions

View File

@@ -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