mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-24 07:48:04 +03:00
clippy: fix unnecessary_unwrap
Signed-off-by: ljedrz <ljedrz@gmail.com>
This commit is contained in:
parent
fc4e2ee4ab
commit
4d8a91418f
@ -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) => {
|
||||
expected_types = types.clone();
|
||||
}
|
||||
ref type_ => {
|
||||
return Err(ExpressionError::unexpected_tuple(
|
||||
type_.to_string(),
|
||||
format!("{:?}", tuple),
|
||||
span,
|
||||
));
|
||||
}
|
||||
match expected_type {
|
||||
Some(Type::Tuple(ref types)) => {
|
||||
expected_types = types.clone();
|
||||
}
|
||||
Some(ref type_) => {
|
||||
return Err(ExpressionError::unexpected_tuple(
|
||||
type_.to_string(),
|
||||
format!("{:?}", tuple),
|
||||
span,
|
||||
));
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
|
||||
let mut result = vec![];
|
||||
|
Loading…
Reference in New Issue
Block a user