chore: fix clippy warnings

This commit is contained in:
Luis Moreno
2021-06-05 01:00:38 -04:00
parent 763a8370eb
commit 0b3bf946df
4 changed files with 5 additions and 7 deletions
+2 -4
View File
@@ -134,10 +134,8 @@ where
U: RealNumber,
V: BaseVector<U>,
{
match self.get_num(category) {
None => None,
Some(&idx) => Some(make_one_hot::<U, V>(idx, self.num_categories)),
}
self.get_num(category)
.map(|&idx| make_one_hot::<U, V>(idx, self.num_categories))
}
/// Invert one-hot vector, back to the category