Skip to content

Commit

Permalink
syslinereaders.rs NFC fix clippy error "not a loop"
Browse files Browse the repository at this point in the history
  • Loading branch information
jtmoon79 committed Oct 21, 2023
1 parent 487138f commit 9a79327
Showing 1 changed file with 27 additions and 29 deletions.
56 changes: 27 additions & 29 deletions src/readers/syslinereader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2883,39 +2883,37 @@ impl SyslineReader {
defn!("(SyslineReader@{:p}, {}, {:?})", self, fileoffset, dt_filter);
let mut fo_cursor: FileOffset = fileoffset;

loop {
defo!("self.find_sysline({})", fo_cursor);
match self.find_sysline(fo_cursor) {
ResultS3SyslineFind::Found((fo, syslinep)) => {
defo!("self.find_sysline({}) returned Found", fo_cursor);
match SyslineReader::sysline_dt_after_or_before(&syslinep, dt_filter) {
Result_Filter_DateTime1::Pass
| Result_Filter_DateTime1::OccursAtOrAfter => {
SyslineReader::debug_assert_gt_fo_syslineend(&fo, &syslinep);
defx!("return ResultS3SyslineFind::Found(({}, @{:p}))", fo_cursor, &syslinep);
return ResultS3SyslineFind::Found((fo_cursor, syslinep));
}
Result_Filter_DateTime1::OccursBefore => {
// advance the "cursor"
defo!("advance fo_cursor from {} to {}", fo_cursor, fo);
debug_assert_gt!(fo, fo_cursor, "fo_cursor not advancing");
fo_cursor = fo;
}
defo!("self.find_sysline({})", fo_cursor);
match self.find_sysline(fo_cursor) {
ResultS3SyslineFind::Found((fo, syslinep)) => {
defo!("self.find_sysline({}) returned Found", fo_cursor);
match SyslineReader::sysline_dt_after_or_before(&syslinep, dt_filter) {
Result_Filter_DateTime1::Pass
| Result_Filter_DateTime1::OccursAtOrAfter => {
SyslineReader::debug_assert_gt_fo_syslineend(&fo, &syslinep);
defx!("return ResultS3SyslineFind::Found(({}, @{:p}))", fo_cursor, &syslinep);
return ResultS3SyslineFind::Found((fo_cursor, syslinep));
}
Result_Filter_DateTime1::OccursBefore => {
// advance the "cursor"
defo!("advance fo_cursor from {} to {}", fo_cursor, fo);
debug_assert_gt!(fo, fo_cursor, "fo_cursor not advancing");
fo_cursor = fo;
}
return ResultS3SyslineFind::Found((fo_cursor, syslinep))
}
ResultS3SyslineFind::Done => {
defo!("self.find_sysline({}) returned Done", fo_cursor);
break;
}
ResultS3SyslineFind::Err(err) => {
defo!("self.find_sysline({}) returned Err({})", fo_cursor, err,);
de_err!("{}", err);
defx!("return ResultS3SyslineFind::Err");
return ResultS3SyslineFind::Err(err)
}
return ResultS3SyslineFind::Found((fo_cursor, syslinep))
}
ResultS3SyslineFind::Done => {
defo!("self.find_sysline({}) returned Done", fo_cursor);
}
ResultS3SyslineFind::Err(err) => {
defo!("self.find_sysline({}) returned Err({})", fo_cursor, err,);
de_err!("{}", err);
defx!("return ResultS3SyslineFind::Err");
return ResultS3SyslineFind::Err(err)
}
}

defx!("return ResultS3SyslineFind::Done");

ResultS3SyslineFind::Done
Expand Down

0 comments on commit 9a79327

Please sign in to comment.