diff options
author | Dan Davison <dandavison7@gmail.com> | 2019-08-08 09:06:00 -0700 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2019-08-08 09:06:00 -0700 |
commit | 96e8109bc89da08ec86aa488f7401f1c634f3b6c (patch) | |
tree | bebe272d6bb04afd34511223980b43abad15fec3 /src/align.rs | |
parent | 63b30eef695196301d21a85bf60b927fa83f15e1 (diff) |
Clippy
Diffstat (limited to 'src/align.rs')
-rw-r--r-- | src/align.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/align.rs b/src/align.rs index bd6aa834..6e9b5af4 100644 --- a/src/align.rs +++ b/src/align.rs @@ -106,7 +106,7 @@ impl<'a> Alignment<'a> { let mut ops = VecDeque::with_capacity(max(self.x.len(), self.y.len())); let mut cell = &self.table[self.index(self.x.len(), self.y.len())]; loop { - ops.push_front(cell.operation.clone()); + ops.push_front(cell.operation); if cell.parent == 0 { break; } @@ -169,12 +169,12 @@ impl<'a> Alignment<'a> { fn print(&self) { println!("x: {:?}", self.x); println!("y: {:?}", self.y); - print!("\n"); + println!(); print!(" "); for j in 0..self.dim[1] { print!("{} ", if j > 0 { self.x[j - 1] } else { " " }) } - print!("\n"); + println!(); for i in 0..self.dim[0] { for j in 0..self.dim[1] { @@ -184,9 +184,9 @@ impl<'a> Alignment<'a> { let cell = &self.table[self.index(j, i)]; print!("{} ", self.format_cell(cell)); } - print!("\n"); + println!(); } - print!("\n"); + println!(); } } @@ -197,7 +197,7 @@ where { let mut encoded = Vec::with_capacity(sequence.len()); - if sequence.len() == 0 { + if sequence.is_empty() { return encoded; } |