Skip to content

Commit

Permalink
feat(format): ignore tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
zhang2014 committed May 7, 2022
1 parent 07755e0 commit 036df85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common/io/src/buffer/buffer_read_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ pub trait BufferReadExt: BufferRead {
}

impl<R> BufferReadExt for R
where R: BufferRead
where R: BufferRead
{
fn ignores(&mut self, f: impl Fn(u8) -> bool) -> Result<usize> {
let mut bytes = 0;
Expand Down Expand Up @@ -191,10 +191,10 @@ where R: BufferRead
}

fn ignore_white_spaces_and_byte(&mut self, b: u8) -> Result<bool> {
self.ignores(|c: u8| c == b' ' || c == b'\t')?;
self.ignores(|c: u8| c == b' ')?;

if self.ignore_byte(b)? {
self.ignores(|c: u8| c == b' ' || c == b'\t')?;
self.ignores(|c: u8| c == b' ')?;
return Ok(true);
}

Expand Down

0 comments on commit 036df85

Please sign in to comment.