Skip to content

Commit

Permalink
fix: LORRI_READDIR was never used
Browse files Browse the repository at this point in the history
When inside the `lazy_static` block, rust-analyzer was not able to
detect if a variable was ever used or not, but since
b2a6499 rust-analyzer point out that
`LORRI_READDIR` regex was never used.

This commit make the if use `LORRI_READDIR` before calling
`LogDatum::ReadDir`.
  • Loading branch information
just1602 committed Aug 21, 2024
1 parent 6b35ec4 commit 304f9b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ where
LogDatum::CopiedSource(PathBuf::from(&matches["source"]))
} else if let Some(matches) = LORRI_READ.captures(linestr) {
LogDatum::ReadRecursively(PathBuf::from(&matches["source"]))
} else if let Some(matches) = LORRI_READ.captures(linestr) {
} else if let Some(matches) = LORRI_READDIR.captures(linestr) {
LogDatum::ReadDir(PathBuf::from(&matches["source"]))
} else {
LogDatum::Text(linestr.to_owned())
Expand Down

0 comments on commit 304f9b8

Please sign in to comment.