Skip to content

Commit

Permalink
chore: Fix lints (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
loewenheim authored Oct 21, 2024
1 parent 818bc98 commit d13cea7
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,8 @@ impl<'a> Iterator for TokenIter<'a> {
type Item = Token<'a>;

fn next(&mut self) -> Option<Token<'a>> {
self.i.get_token(self.next_idx).map(|tok| {
self.i.get_token(self.next_idx).inspect(|_| {
self.next_idx += 1;
tok
})
}
}
Expand All @@ -345,9 +344,8 @@ impl<'a> Iterator for SourceIter<'a> {
type Item = &'a str;

fn next(&mut self) -> Option<&'a str> {
self.i.get_source(self.next_idx).map(|source| {
self.i.get_source(self.next_idx).inspect(|_| {
self.next_idx += 1;
source
})
}
}
Expand Down Expand Up @@ -382,9 +380,8 @@ impl<'a> Iterator for NameIter<'a> {
type Item = &'a str;

fn next(&mut self) -> Option<&'a str> {
self.i.get_name(self.next_idx).map(|name| {
self.i.get_name(self.next_idx).inspect(|_| {
self.next_idx += 1;
name
})
}
}
Expand Down Expand Up @@ -438,9 +435,8 @@ impl<'a> Iterator for SourceMapSectionIter<'a> {
type Item = &'a SourceMapSection;

fn next(&mut self) -> Option<&'a SourceMapSection> {
self.i.get_section(self.next_idx).map(|sec| {
self.i.get_section(self.next_idx).inspect(|_| {
self.next_idx += 1;
sec
})
}
}
Expand Down

0 comments on commit d13cea7

Please sign in to comment.