Skip to content

Commit ff5cb33

Browse files
author
Pil Eghoff
committed
Skip line if no match found
1 parent f96a86b commit ff5cb33

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/app_state.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,11 @@ impl RunningState {
258258
"Unable to get line {} from log file",
259259
self.log_index
260260
))?;
261-
let res = search_files(&self.files, &self.settings.log_pattern, log_line)
262-
.context("No match found")?;
263-
if res.score > 0 {
264-
return Ok(res);
261+
let res = search_files(&self.files, &self.settings.log_pattern, log_line);
262+
if let Some(res) = res {
263+
if res.score > 0 {
264+
return Ok(res);
265+
}
265266
}
266267

267268
self.increment_log_index()?;

0 commit comments

Comments
 (0)