fmt: ran clippy
This commit is contained in:
@@ -36,7 +36,7 @@ impl Texture {
|
||||
width: img.width(),
|
||||
height: img.height(),
|
||||
source: img,
|
||||
stride: stride,
|
||||
stride,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ impl Texture {
|
||||
let b = self.source.as_bytes();
|
||||
let idx = self._idx(u, v);
|
||||
|
||||
Vec3::from_u8(b[self.stride * idx + 0], b[self.stride * idx + 2], b[self.stride * idx + 1])
|
||||
Vec3::from_u8(b[self.stride * idx], b[self.stride * idx + 2], b[self.stride * idx + 1])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +59,6 @@ impl Material for Texture {
|
||||
fn scatter(&self, hit: &Hit, _ray: &Ray) -> Option<(Option<Ray>, Vec3)> {
|
||||
let (u, v) = hit.uv();
|
||||
let col = self._at(u, 1. - v);
|
||||
return Some((None, col));
|
||||
Some((None, col))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user