Skip to content

Commit

Permalink
Addressed Clippy comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
zlogic committed May 25, 2024
1 parent dcd7e46 commit bc85ddb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ impl ProjectedPolygon {
.clamp(0.0, self.max_y as f64) as usize;

ProjectedPolygonIterator {
polygon: &self,
polygon: self,
max_x: self.max_x,
max_y,
x: 0,
Expand Down Expand Up @@ -220,8 +220,8 @@ impl<'a> ProjectedPolygonIterator<'a> {
}

fn scanline_value(&self, x: f64) -> Option<f64> {
let x_c = (x as f64 - self.start_x) / (self.end_x - self.start_x);
if x_c >= 0.0 && x_c <= 1.0 {
let x_c = (x - self.start_x) / (self.end_x - self.start_x);
if (0.0..=1.0).contains(&x_c) {
Some(self.start_value * (1.0 - x_c) + x_c * self.end_value)
} else {
None
Expand Down
2 changes: 1 addition & 1 deletion src/reconstruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ impl ImageReconstruction {
fn reconstruct_dense(
&mut self,
gpu_device: Option<correlation::GpuDevice>,
linked_images: &Vec<usize>,
linked_images: &[usize],
f_matrices: Vec<Vec<Option<Matrix3<f64>>>>,
) -> Result<(), triangulation::TriangulationError> {
let mut gpu_device = gpu_device;
Expand Down

0 comments on commit bc85ddb

Please sign in to comment.