Update Analytics req + Fix versions list (#529)

* Update Analytics req + Fix versions list

* Fix sentry support

* Fix lint
This commit is contained in:
Geometrically
2023-02-01 10:08:02 -07:00
committed by GitHub
parent 26533c47e7
commit afdab0300e
21 changed files with 441 additions and 160 deletions

View File

@@ -40,7 +40,7 @@ pub async fn get_github_user_from_token(
.header(reqwest::header::USER_AGENT, "Modrinth")
.header(
reqwest::header::AUTHORIZATION,
format!("token {}", access_token),
format!("token {access_token}"),
)
.send()
.await?

View File

@@ -25,17 +25,14 @@ pub fn validation_errors_to_string(
ValidationErrorsKind::Struct(errors) => {
validation_errors_to_string(
*errors.clone(),
Some(format!("of item {}", field)),
Some(format!("of item {field}")),
)
}
ValidationErrorsKind::List(list) => {
if let Some((index, errors)) = list.iter().next() {
output.push_str(&validation_errors_to_string(
*errors.clone(),
Some(format!(
"of list {} with index {}",
field, index
)),
Some(format!("of list {field} with index {index}")),
));
}