clippy: Fix clippy::get_first
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

Fix the `clippy::get_first` lint.

Note clippy fails due to a false positive.
This commit is contained in:
finga 2023-06-11 15:08:42 +02:00
parent 55c5134840
commit f6ec8af944

View file

@ -87,7 +87,7 @@ impl Hook {
if let Some('}') = command_template.next() {
let expr = token.trim().split(' ').collect::<Vec<&str>>();
let replaced = match expr.get(0) {
let replaced = match expr.first() {
Some(&"header") => get_header_field(
headers,
expr.get(1).ok_or_else(|| {