Fix a couple of clippy lint warnings

This commit is contained in:
Oliver Hamlet
2020-06-13 23:21:37 +01:00
parent d0bde327c2
commit 76b8f0bd86
2 changed files with 4 additions and 5 deletions
-1
View File
@@ -6,7 +6,6 @@ use std::path::PathBuf;
use nom::error::ErrorKind;
use nom::Err;
use regex;
#[derive(Debug)]
pub enum Error {
+4 -4
View File
@@ -163,10 +163,10 @@ fn pad_release_ids(ids1: &[Identifier], ids2: &[Identifier]) -> (Vec<Identifier>
let mut ids1 = ids1.to_vec();
let mut ids2 = ids2.to_vec();
if ids1.len() < ids2.len() {
ids1.resize(ids2.len(), Identifier::Numeric(0));
} else if ids2.len() < ids1.len() {
ids2.resize(ids1.len(), Identifier::Numeric(0));
match ids1.len().cmp(&ids2.len()) {
Ordering::Less => ids1.resize(ids2.len(), Identifier::Numeric(0)),
Ordering::Greater => ids2.resize(ids1.len(), Identifier::Numeric(0)),
_ => {}
}
(ids1, ids2)