Fix lots of clippy lints

This commit is contained in:
Jonas Platte 2021-06-17 20:34:14 +02:00
parent af2ce5803e
commit f3e630c064
No known key found for this signature in database
GPG key ID: CC154DE0E30B7C67
17 changed files with 140 additions and 202 deletions

View file

@ -110,9 +110,9 @@ impl Media {
let content_type = parts
.next()
.map(|bytes| {
Ok::<_, Error>(utils::string_from_bytes(bytes).map_err(|_| {
utils::string_from_bytes(bytes).map_err(|_| {
Error::bad_database("Content type in mediaid_file is invalid unicode.")
})?)
})
})
.transpose()?;
@ -199,9 +199,9 @@ impl Media {
let content_type = parts
.next()
.map(|bytes| {
Ok::<_, Error>(utils::string_from_bytes(bytes).map_err(|_| {
utils::string_from_bytes(bytes).map_err(|_| {
Error::bad_database("Content type in mediaid_file is invalid unicode.")
})?)
})
})
.transpose()?;
@ -235,9 +235,9 @@ impl Media {
let content_type = parts
.next()
.map(|bytes| {
Ok::<_, Error>(utils::string_from_bytes(bytes).map_err(|_| {
utils::string_from_bytes(bytes).map_err(|_| {
Error::bad_database("Content type in mediaid_file is invalid unicode.")
})?)
})
})
.transpose()?;