1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-08-12 05:59:08 +00:00

Some formatting and dependency updates

This commit is contained in:
Daniel García 2019-03-03 16:11:55 +01:00
commit 04922f6aa0
No known key found for this signature in database
GPG key ID: FC8A7D14C3CD543A
6 changed files with 131 additions and 147 deletions

View file

@ -8,7 +8,7 @@ use rocket::Route;
use reqwest::{header::HeaderMap, Client, Response};
use rocket::http::{Cookie};
use rocket::http::Cookie;
use regex::Regex;
use soup::prelude::*;
@ -278,13 +278,13 @@ fn parse_sizes(sizes: &str) -> (u16, u16) {
if !sizes.is_empty() {
match Regex::new(r"(?x)(\d+)\D*(\d+)").unwrap().captures(sizes.trim()) {
None => {},
None => {}
Some(dimensions) => {
if dimensions.len() >= 3 {
width = dimensions[1].parse::<u16>().unwrap_or_default();
height = dimensions[2].parse::<u16>().unwrap_or_default();
}
},
}
}
}
@ -305,7 +305,7 @@ fn download_icon(domain: &str) -> Result<Vec<u8>, Error> {
info!("Download finished for {}", url);
res.copy_to(&mut buffer)?;
break;
},
}
Err(_) => info!("Download failed for {}", url),
};
}