Skip to content

Commit 1e38c70

Browse files
committed
Fix clippy warnings in autobuilder
1 parent 2f46277 commit 1e38c70

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

autobuilder/src/main.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ fn main() -> std::io::Result<()> {
2626

2727
for line in env::var("LGTM_INDEX_FILTERS")
2828
.unwrap_or_default()
29-
.split("\n")
29+
.split('\n')
3030
{
31-
if line.starts_with("include:") {
32-
cmd.arg("--include").arg(&line[8..]);
33-
} else if line.starts_with("exclude:") {
34-
cmd.arg("--exclude").arg(&line[8..]);
31+
if let Some(stripped) = line.strip_prefix("include:") {
32+
cmd.arg("--include").arg(stripped);
33+
} else if let Some(stripped) = line.strip_prefix("exclude:") {
34+
cmd.arg("--exclude").arg(stripped);
3535
}
3636
}
3737
let exit = &cmd.spawn()?.wait()?;

0 commit comments

Comments
 (0)