fx: ran linter

This commit is contained in:
2026-05-02 14:02:06 +02:00
parent 17ad6e30db
commit a44e61c1f7
7 changed files with 14 additions and 32 deletions

View File

@@ -4,7 +4,6 @@ use crate::objects::traits::Hittable;
use crate::objects::triangle::Triangle;
use crate::ray::Ray;
use crate::{objects::materials::traits::Material, vec3::Vec3};
use log::{info, warn};
use std::fmt::Debug;
use std::sync::Arc;
@@ -29,12 +28,12 @@ impl Quad {
}
}
pub fn corner_spheres(&self) -> Vec<Sphere> {
let mut out: Vec<Sphere> = vec![];
out.push(Sphere::new(self.p1, 1., self.material.clone()));
out.push(Sphere::new(self.p2, 1., self.material.clone()));
out.push(Sphere::new(self.p3, 1., self.material.clone()));
out.push(Sphere::new(self.p4, 1., self.material.clone()));
return out;
vec![
Sphere::new(self.p1, 1., self.material.clone()),
Sphere::new(self.p2, 1., self.material.clone()),
Sphere::new(self.p3, 1., self.material.clone()),
Sphere::new(self.p4, 1., self.material.clone()),
]
}
pub fn hit(
@@ -51,7 +50,7 @@ impl Quad {
if isct1.is_some() {
return isct1;
}
return isct2;
isct2
}
}
@@ -82,6 +81,6 @@ impl Hittable for Quad {
fn normal_at(&self, _p: &Vec3) -> Vec3 {
// FIXME: might cause ownership issues
return self.normal;
self.normal
}
}