Skip to content

Commit

Permalink
Fix clippy warning (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
kubouch authored Sep 29, 2024
1 parent eba17ca commit 0cfcc58
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1953,15 +1953,15 @@ impl Parser {

pub fn is_horizontal_space(&self) -> bool {
let span_position = self.span_offset;
let whitespace: &[u8] = &[b' ', b'\t'];
let whitespace: &[u8] = b" \t";

span_position < self.compiler.source.len()
&& whitespace.contains(&self.compiler.source[span_position])
}

pub fn skip_space(&mut self) {
let mut span_position = self.span_offset;
let whitespace: &[u8] = &[b' ', b'\t'];
let whitespace: &[u8] = b" \t";
while span_position < self.compiler.source.len() {
if !whitespace.contains(&self.compiler.source[span_position]) {
break;
Expand All @@ -1980,7 +1980,7 @@ impl Parser {

pub fn newline(&mut self) -> Option<Token> {
let mut span_position = self.span_offset;
let whitespace: &[u8] = &[b'\r', b'\n'];
let whitespace: &[u8] = b"\r\n";
while span_position < self.compiler.source.len() {
if !whitespace.contains(&self.compiler.source[span_position]) {
break;
Expand Down

0 comments on commit 0cfcc58

Please sign in to comment.