mirror of
https://codeberg.org/icewind/ugc-scaper.git
synced 2026-06-03 18:24:10 +02:00
clippy
This commit is contained in:
parent
6eec064496
commit
4b11b636c7
4 changed files with 10 additions and 8 deletions
2
api-server/Cargo.lock
generated
2
api-server/Cargo.lock
generated
|
|
@ -1743,6 +1743,8 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "ugc-scraper"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "11be22a2de36995a81b56450a26132bb8718296f60616e32487f59cd2cd49e12"
|
||||
dependencies = [
|
||||
"reqwest",
|
||||
"scraper",
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ edition = "2021"
|
|||
[dependencies]
|
||||
tokio = { version = "1.34.0", features = ["macros", "rt-multi-thread", "rt"] }
|
||||
main_error = "0.1.2"
|
||||
ugc-scraper = { path = "../", version = "0.2.1" }
|
||||
#ugc-scraper = "0.2.1"
|
||||
#ugc-scraper = { path = "../", version = "0.2.1" }
|
||||
ugc-scraper = "0.2.1"
|
||||
axum = "0.6.20"
|
||||
steamid-ng = "1.0.0"
|
||||
thiserror = "1.0.50"
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue