forked from didirus/AstralRinth
Update Analytics req + Fix versions list (#529)
* Update Analytics req + Fix versions list * Fix sentry support * Fix lint
This commit is contained in:
@@ -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?
|
||||
|
||||
@@ -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}")),
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user