mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
remove unneeded error vec
This commit is contained in:
parent
58fd1d64ff
commit
9207145792
1 changed files with 2 additions and 10 deletions
|
@ -32,12 +32,6 @@ pub enum Literal {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn simplify<'a>(pattern: &crate::expr::Pattern<'a>) -> Pattern {
|
fn simplify<'a>(pattern: &crate::expr::Pattern<'a>) -> Pattern {
|
||||||
let mut errors = Vec::new();
|
|
||||||
|
|
||||||
simplify_help(pattern, &mut errors)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn simplify_help<'a>(pattern: &crate::expr::Pattern<'a>, errors: &mut Vec<Error>) -> Pattern {
|
|
||||||
use crate::expr::Pattern::*;
|
use crate::expr::Pattern::*;
|
||||||
|
|
||||||
match pattern {
|
match pattern {
|
||||||
|
@ -73,10 +67,8 @@ fn simplify_help<'a>(pattern: &crate::expr::Pattern<'a>, errors: &mut Vec<Error>
|
||||||
union,
|
union,
|
||||||
..
|
..
|
||||||
} => {
|
} => {
|
||||||
let simplified_args: std::vec::Vec<_> = arguments
|
let simplified_args: std::vec::Vec<_> =
|
||||||
.iter()
|
arguments.iter().map(|v| simplify(&v)).collect();
|
||||||
.map(|v| simplify_help(&v, errors))
|
|
||||||
.collect();
|
|
||||||
Ctor(union.clone(), tag_name.clone(), simplified_args)
|
Ctor(union.clone(), tag_name.clone(), simplified_args)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue