From 5b8f1001215bc56314961bd8b8b034affcfd5524 Mon Sep 17 00:00:00 2001 From: lqdev Date: Mon, 28 Aug 2023 19:21:45 +0200 Subject: [PATCH] remove unused method --- crates/treehouse-format/src/pull.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/crates/treehouse-format/src/pull.rs b/crates/treehouse-format/src/pull.rs index a8c7ea1..a282559 100644 --- a/crates/treehouse-format/src/pull.rs +++ b/crates/treehouse-format/src/pull.rs @@ -74,13 +74,6 @@ impl<'a> Parser<'a> { } } - fn eat_until(&mut self, cond: impl Fn(char) -> bool) { - while self.current().map(&cond).is_some_and(|x| !x) { - self.advance(); - } - self.advance(); - } - fn eat_until_line_break(&mut self) { loop { match self.current() { @@ -144,7 +137,8 @@ impl<'a> Parser<'a> { if self.current().map(&cond).is_some_and(identity) || self.current().is_none() { self.position = before_indentation; break; - } else if !matches!(self.current(), Some('\n') | Some('\r')) && line_indent_level < indent_level + } else if !matches!(self.current(), Some('\n') | Some('\r')) + && line_indent_level < indent_level { return Err(ParseErrorKind::InconsistentIndentation { got: line_indent_level,