aboutsummaryrefslogtreecommitdiff
path: root/pixel-client/src/render
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-07-18 15:52:12 +0200
committermetamuffin <metamuffin@disroot.org>2024-07-18 15:52:12 +0200
commit1bff001db2914e8ee7bc331a4104592ad6e2e9a3 (patch)
tree28b12471e0dc905a8135123df8ddf400c24ed8b2 /pixel-client/src/render
parent1dd3f549debdffd85639d74248a12dd884c5a59b (diff)
downloadhurrycurry-1bff001db2914e8ee7bc331a4104592ad6e2e9a3.tar
hurrycurry-1bff001db2914e8ee7bc331a4104592ad6e2e9a3.tar.bz2
hurrycurry-1bff001db2914e8ee7bc331a4104592ad6e2e9a3.tar.zst
clippy
Diffstat (limited to 'pixel-client/src/render')
-rw-r--r--pixel-client/src/render/mod.rs2
-rw-r--r--pixel-client/src/render/sprite.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/pixel-client/src/render/mod.rs b/pixel-client/src/render/mod.rs
index f18d96ad..4eea439a 100644
--- a/pixel-client/src/render/mod.rs
+++ b/pixel-client/src/render/mod.rs
@@ -71,7 +71,7 @@ impl<'a> SpriteRenderer<'a> {
}
for (x, char) in line.chars().enumerate() {
let color = palette.get(&char).unwrap();
- texels[(y * 1024 + x) * 4 + 0] = color[3];
+ texels[(y * 1024 + x) * 4] = color[3];
texels[(y * 1024 + x) * 4 + 1] = color[2];
texels[(y * 1024 + x) * 4 + 2] = color[1];
texels[(y * 1024 + x) * 4 + 3] = color[0];
diff --git a/pixel-client/src/render/sprite.rs b/pixel-client/src/render/sprite.rs
index 4210b58d..084e277e 100644
--- a/pixel-client/src/render/sprite.rs
+++ b/pixel-client/src/render/sprite.rs
@@ -92,7 +92,7 @@ impl Ord for SpriteDraw {
}
impl PartialOrd for SpriteDraw {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
- Some(self.cmp(&other))
+ Some(self.cmp(other))
}
}
impl Eq for SpriteDraw {}