mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-28 04:35:33 +03:00
Clippy
This commit is contained in:
parent
b3c1723d5c
commit
34f2dd6f62
@ -86,13 +86,13 @@ impl ExpressionReconstructor for Flattener<'_> {
|
|||||||
assert!(first_type.eq_flat(&second_type));
|
assert!(first_type.eq_flat(&second_type));
|
||||||
|
|
||||||
match &first_type {
|
match &first_type {
|
||||||
Type::Array(first_type) => self.ternary_array(&first_type, &input.condition, &first, &second),
|
Type::Array(first_type) => self.ternary_array(first_type, &input.condition, &first, &second),
|
||||||
Type::Identifier(first_type) => {
|
Type::Identifier(first_type) => {
|
||||||
// Get the struct definitions.
|
// Get the struct definitions.
|
||||||
let first_type = self.symbol_table.lookup_struct(first_type.name).unwrap();
|
let first_type = self.symbol_table.lookup_struct(first_type.name).unwrap();
|
||||||
self.ternary_struct(&first_type, &input.condition, &first, &second)
|
self.ternary_struct(first_type, &input.condition, &first, &second)
|
||||||
}
|
}
|
||||||
Type::Tuple(first_type) => self.ternary_tuple(&first_type, &input.condition, &first, &second),
|
Type::Tuple(first_type) => self.ternary_tuple(first_type, &input.condition, &first, &second),
|
||||||
_ => {
|
_ => {
|
||||||
// Reconstruct the true case.
|
// Reconstruct the true case.
|
||||||
let (if_true, stmts) = self.reconstruct_expression(Expression::Identifier(first));
|
let (if_true, stmts) = self.reconstruct_expression(Expression::Identifier(first));
|
||||||
|
Loading…
Reference in New Issue
Block a user