remove unneeded argument

This commit is contained in:
Folkert 2021-03-12 02:48:07 +01:00
parent 362459b647
commit 4e4854ceaa
10 changed files with 24 additions and 24 deletions

View file

@ -27,7 +27,7 @@ pub enum Either<First, Second> {
}
impl<'a> State<'a> {
pub fn new_in(arena: &'a Bump, bytes: &'a [u8]) -> State<'a> {
pub fn new(bytes: &'a [u8]) -> State<'a> {
State {
bytes,
line: 0,

View file

@ -17,7 +17,7 @@ pub fn parse_defs_with<'a>(
arena: &'a Bump,
input: &'a str,
) -> Result<Vec<'a, Located<ast::Def<'a>>>, SyntaxError<'a>> {
let state = State::new_in(arena, input.trim().as_bytes());
let state = State::new(input.trim().as_bytes());
let answer = module_defs().parse(arena, state);
answer
.map(|(_, loc_expr, _)| loc_expr)
@ -29,7 +29,7 @@ pub fn parse_loc_with<'a>(
arena: &'a Bump,
input: &'a str,
) -> Result<Located<ast::Expr<'a>>, SyntaxError<'a>> {
let state = State::new_in(arena, input.trim().as_bytes());
let state = State::new(input.trim().as_bytes());
match crate::expr::test_parse_expr(0, arena, state) {
Ok((loc_expr, _state)) => Ok(loc_expr),