clippy: fix unnecessary_unwrap

Signed-off-by: ljedrz <ljedrz@gmail.com>
This commit is contained in:
ljedrz 2020-10-06 12:27:45 +02:00
parent fc4e2ee4ab
commit 4d8a91418f

View File

@ -38,19 +38,18 @@ impl<F: Field + PrimeField, G: GroupType<F>> ConstrainedProgram<F, G> {
// Check explicit tuple type dimension if given
let mut expected_types = vec![];
if expected_type.is_some() {
match expected_type.unwrap() {
Type::Tuple(ref types) => {
match expected_type {
Some(Type::Tuple(ref types)) => {
expected_types = types.clone();
}
ref type_ => {
Some(ref type_) => {
return Err(ExpressionError::unexpected_tuple(
type_.to_string(),
format!("{:?}", tuple),
span,
));
}
}
None => {}
}
let mut result = vec![];