Some minor cleanup recommended by clippy
This commit is contained in:
parent
34232bb7d3
commit
5fbed4a17f
|
|
@ -69,11 +69,10 @@ impl<T: Real> BoundingVolumeHierarchy<T> {
|
|||
right,
|
||||
}
|
||||
} else if nodes.len() == 1 {
|
||||
match nodes[0] {
|
||||
(bounds, ref primitive) => BoundingVolumeHierarchy::Leaf {
|
||||
bounds,
|
||||
primitive: Arc::clone(primitive),
|
||||
},
|
||||
let (bounds, ref primitive) = nodes[0];
|
||||
BoundingVolumeHierarchy::Leaf {
|
||||
bounds,
|
||||
primitive: Arc::clone(primitive),
|
||||
}
|
||||
} else {
|
||||
BoundingVolumeHierarchy::None
|
||||
|
|
@ -202,7 +201,7 @@ impl<T: Real> Iterator for FilterIterator<'_, T> {
|
|||
BoundingVolumeHierarchy::None => {}
|
||||
}
|
||||
}
|
||||
return Option::None;
|
||||
Option::None
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,11 +39,11 @@ impl<T: Real> Interval<T> {
|
|||
}
|
||||
|
||||
pub fn get_min(&self) -> T {
|
||||
return self.min;
|
||||
self.min
|
||||
}
|
||||
|
||||
pub fn get_max(&self) -> T {
|
||||
return self.max;
|
||||
self.max
|
||||
}
|
||||
|
||||
pub fn is_degenerate(self) -> bool {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use crate::Real;
|
|||
fn spread_bits(v: u32) -> u32 {
|
||||
let mut result = 0;
|
||||
for power in 0..9 {
|
||||
result |= ((1 << power) & v) << power * 2;
|
||||
result |= ((1 << power) & v) << (power * 2);
|
||||
}
|
||||
result
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue