mirror of
https://github.com/Dummi26/mers.git
synced 2025-03-10 05:43:53 +01:00
fixed tuple reversing type order when initializing
and try's error message now starts counting at Function #1 instead of #0.
This commit is contained in:
parent
5e20f92849
commit
fd2a3382fc
@ -75,7 +75,7 @@ impl Config {
|
||||
for (i, err) in func_errors.into_iter().enumerate() {
|
||||
if let Some(err) = err {
|
||||
e = e
|
||||
.msg(format!("Error for function #{i}:"))
|
||||
.msg(format!("Error for function #{}:", i + 1))
|
||||
.err(err);
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
use std::sync::Arc;
|
||||
use std::{collections::VecDeque, sync::Arc};
|
||||
|
||||
use colored::Colorize;
|
||||
|
||||
@ -20,7 +20,7 @@ impl MersStatement for Tuple {
|
||||
let mut it = if let Some(init_to) = init_to {
|
||||
let mut vec = (0..self.elems.len())
|
||||
.map(|_| Type::empty())
|
||||
.collect::<Vec<_>>();
|
||||
.collect::<VecDeque<_>>();
|
||||
for t in init_to.types.iter() {
|
||||
if let Some(t) = t.as_any().downcast_ref::<TupleT>() {
|
||||
if t.0.len() == self.elems.len() {
|
||||
@ -46,7 +46,7 @@ impl MersStatement for Tuple {
|
||||
v.check(
|
||||
info,
|
||||
if let Some(it) = &mut it {
|
||||
Some(it.pop().unwrap())
|
||||
Some(it.pop_front().unwrap())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user