refactor: improve type ergonomics

This commit is contained in:
Lucille L. Blumire 2025-04-17 16:03:42 +01:00
parent 0768b0ad67
commit 2ff169da9f
No known key found for this signature in database
GPG key ID: D168492023622329
11 changed files with 22 additions and 25 deletions

View file

@ -96,7 +96,7 @@ impl Error {
impl From<reqwest::Error> for Error {
fn from(value: reqwest::Error) -> Self {
Self::Http {
status_code: value.status().map(|v| v.as_u16()).unwrap_or(0),
status_code: value.status().map_or(0, |v| v.as_u16()),
message: value.to_string(),
}
}