mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-09-24 18:41:17 +00:00
Async/Awaited all db methods
This is a rather large PR which updates the async branch to have all the database methods as an async fn. Some iter/map logic needed to be changed to a stream::iter().then(), but besides that most changes were just adding async/await where needed.
This commit is contained in:
parent
2d5f172e77
commit
775d07e9a0
34 changed files with 1424 additions and 1198 deletions
|
@ -745,6 +745,7 @@ async fn download_icon(domain: &str) -> Result<(Bytes, Option<&str>), Error> {
|
|||
buffer = stream_to_bytes_limit(res, 512 * 1024).await?; // 512 KB for each icon max
|
||||
// Check if the icon type is allowed, else try an icon from the list.
|
||||
icon_type = get_icon_type(&buffer);
|
||||
// Check if the icon type is allowed, else try an icon from the list.
|
||||
if icon_type.is_none() {
|
||||
buffer.clear();
|
||||
debug!("Icon from {}, is not a valid image type", icon.href);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue