diff --git a/compiler/ast/src/functions/mod.rs b/compiler/ast/src/functions/mod.rs index 1b27d9019e..9e452c4b3b 100644 --- a/compiler/ast/src/functions/mod.rs +++ b/compiler/ast/src/functions/mod.rs @@ -38,8 +38,7 @@ pub use output::*; pub mod mode; pub use mode::*; -use crate::{Block, FunctionStub, Identifier, Node, NodeID, Tuple, Type}; -use crate::{Block, Identifier, Node, NodeID, TupleType, Type}; +use crate::{Block, FunctionStub, Identifier, Node, NodeID, TupleType, Type}; use leo_span::{sym, Span, Symbol}; use serde::{Deserialize, Serialize}; diff --git a/compiler/ast/src/stub/function_stub.rs b/compiler/ast/src/stub/function_stub.rs index 47aafce8d8..85fc25085a 100644 --- a/compiler/ast/src/stub/function_stub.rs +++ b/compiler/ast/src/stub/function_stub.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{Annotation, Block, Finalize, Function, Identifier, Input, Node, NodeID, Output, Tuple, Type, Variant}; +use crate::{Annotation, Block, Finalize, Function, Identifier, Input, Node, NodeID, Output, TupleType, Type, Variant}; use leo_span::{sym, Span, Symbol}; use serde::{Deserialize, Serialize}; @@ -76,7 +76,7 @@ impl FunctionStub { let output_type = match output.len() { 0 => Type::Unit, 1 => get_output_type(&output[0]), - _ => Type::Tuple(Tuple(output.iter().map(get_output_type).collect())), + _ => Type::Tuple(TupleType::new(output.iter().map(get_output_type).collect())), }; FunctionStub { annotations, variant, identifier, input, output, output_type, block, finalize, span, id } diff --git a/tests/test-framework/src/error.rs b/tests/test-framework/src/error.rs index aa1327f0bb..743ab229b6 100644 --- a/tests/test-framework/src/error.rs +++ b/tests/test-framework/src/error.rs @@ -38,8 +38,9 @@ pub enum TestError { impl fmt::Display for TestError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let format_test = - |test: &str| -> String { if test.len() > 50 { String::new() } else { format!("\n\n{test}\n\n") } }; + let format_test = |test: &str| -> String { + if test.len() > 50 { String::new() } else { format!("\n\n{test}\n\n") } + }; match self { TestError::Panicked { test, index, error } => { write!(f, "test #{}: {}encountered a rust panic:\n{}", index + 1, format_test(test), error)