Skip to content

Commit d13cea7

Browse files
authored
chore: Fix lints (#95)
1 parent 818bc98 commit d13cea7

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/types.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,8 @@ impl<'a> Iterator for TokenIter<'a> {
328328
type Item = Token<'a>;
329329

330330
fn next(&mut self) -> Option<Token<'a>> {
331-
self.i.get_token(self.next_idx).map(|tok| {
331+
self.i.get_token(self.next_idx).inspect(|_| {
332332
self.next_idx += 1;
333-
tok
334333
})
335334
}
336335
}
@@ -345,9 +344,8 @@ impl<'a> Iterator for SourceIter<'a> {
345344
type Item = &'a str;
346345

347346
fn next(&mut self) -> Option<&'a str> {
348-
self.i.get_source(self.next_idx).map(|source| {
347+
self.i.get_source(self.next_idx).inspect(|_| {
349348
self.next_idx += 1;
350-
source
351349
})
352350
}
353351
}
@@ -382,9 +380,8 @@ impl<'a> Iterator for NameIter<'a> {
382380
type Item = &'a str;
383381

384382
fn next(&mut self) -> Option<&'a str> {
385-
self.i.get_name(self.next_idx).map(|name| {
383+
self.i.get_name(self.next_idx).inspect(|_| {
386384
self.next_idx += 1;
387-
name
388385
})
389386
}
390387
}
@@ -438,9 +435,8 @@ impl<'a> Iterator for SourceMapSectionIter<'a> {
438435
type Item = &'a SourceMapSection;
439436

440437
fn next(&mut self) -> Option<&'a SourceMapSection> {
441-
self.i.get_section(self.next_idx).map(|sec| {
438+
self.i.get_section(self.next_idx).inspect(|_| {
442439
self.next_idx += 1;
443-
sec
444440
})
445441
}
446442
}

0 commit comments

Comments
 (0)