This commit is contained in:
Robin Appelman 2023-11-21 20:26:04 +01:00
commit 4b11b636c7
4 changed files with 10 additions and 8 deletions

View file

@ -52,7 +52,7 @@ impl Parser for TeamLookupParser {
role: "team name",
selector: SELECTOR_OPTION,
})?;
let (_, name) = text.split_once("-").unwrap_or_default();
let (_, name) = text.split_once('-').unwrap_or_default();
let id = team_id_from_link(link)?;
Ok(TeamRef {

View file

@ -157,7 +157,7 @@ impl Parser for TeamMatchesParser {
let (score, score_opponent) =
scores
.split_once("-")
.split_once('-')
.ok_or_else(|| ParseError::InvalidText {
text: scores.to_string(),
role: "match scores",
@ -187,8 +187,8 @@ impl Parser for TeamMatchesParser {
role: "match page link",
})?,
opponent,
score: score,
score_opponent: score_opponent,
score,
score_opponent,
match_points: point,
match_points_opponent: points_opponent,
}
@ -199,8 +199,8 @@ impl Parser for TeamMatchesParser {
role: "match page link",
})?,
opponent,
score: score,
score_opponent: score_opponent,
score,
score_opponent,
},
_ => MatchResult::ByeWeek,
};