Skip to content

Commit

Permalink
Three Clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ogham committed Apr 26, 2020
1 parent 25e55c8 commit 7e36e5c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ impl Grid {
let mut cells = self.cells.clone();
cells.sort_unstable_by(|a, b| b.cmp(a)); // Sort in reverse order

for cell in cells.iter() {
for cell in &cells {
if cell.width + col_total_width_so_far <= maximum_width {
theoretical_min_num_cols += 1;
col_total_width_so_far += cell.width;
Expand All @@ -359,7 +359,7 @@ impl Grid {
// If we make it to this point, we have exhausted all cells before
// reaching the maximum width; the theoretical max number of lines
// needed to display all cells is 1.
return 1;
1
}

fn width_dimensions(&self, maximum_width: Width) -> Option<Dimensions> {
Expand Down Expand Up @@ -499,7 +499,7 @@ impl<'grid> fmt::Display for Display<'grid> {
}
}

write!(f, "\n")?;
writeln!(f)?;
}

Ok(())
Expand Down

0 comments on commit 7e36e5c

Please sign in to comment.