mirror of
https://github.com/AleoHQ/leo.git
synced 2024-11-13 08:47:17 +03:00
rebase fix
This commit is contained in:
parent
bd2e3de733
commit
f1a19b2a03
@ -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};
|
||||
|
@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
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 }
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user