Clippy lint.
This commit is contained in:
@@ -25,10 +25,7 @@ fn vec_first_into<T>(v: Vec<T>) -> T {
|
||||
v.len()
|
||||
));
|
||||
}
|
||||
for i in v.into_iter() {
|
||||
return i;
|
||||
}
|
||||
panic!("Unreachable");
|
||||
v.into_iter().next().unwrap()
|
||||
}
|
||||
|
||||
fn vec_split_into<T>(v: Vec<T>, offset: usize) -> (Vec<T>, Vec<T>) {
|
||||
@@ -167,9 +164,9 @@ impl Hit for KDTree {
|
||||
None => None,
|
||||
Some(_bbox) => match (left.hit(r, t_min, t_max), right.hit(r, t_min, t_max)) {
|
||||
(Some(hit_left), Some(hit_right)) => if hit_left.t < hit_right.t {
|
||||
return Some(hit_left);
|
||||
Some(hit_left)
|
||||
} else {
|
||||
return Some(hit_right);
|
||||
Some(hit_right)
|
||||
},
|
||||
(Some(hit_left), None) => Some(hit_left),
|
||||
(None, Some(hit_right)) => Some(hit_right),
|
||||
|
||||
Reference in New Issue
Block a user