From cb1663fc1208c5cdd537a4241e9d1477df865192 Mon Sep 17 00:00:00 2001 From: Steve Divskinsy Date: Wed, 9 Oct 2019 22:22:52 +1030 Subject: [PATCH 1/2] Very simple grammar updates Just some basic grammar updates in the "get in touch" section. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 571a3631..02c4ec7d 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,6 @@ See the [bitwarden_rs wiki](https://github.com/dani-garcia/bitwarden_rs/wiki) fo ## Get in touch -To ask an question, [raising an issue](https://github.com/dani-garcia/bitwarden_rs/issues/new) is fine, also please report any bugs spotted here. +To ask a question, [raising an issue](https://github.com/dani-garcia/bitwarden_rs/issues/new) is fine. Please also report any bugs spotted here. If you prefer to chat, we're usually hanging around at [#bitwarden_rs:matrix.org](https://matrix.to/#/#bitwarden_rs:matrix.org) room on Matrix. Feel free to join us! From d292269ea069af7ebd342548d42bb7810848eca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Thu, 10 Oct 2019 23:21:22 +0200 Subject: [PATCH 2/2] Make the blacklist logic be cached --- src/api/icons.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/api/icons.rs b/src/api/icons.rs index c22f9ff7..31e7f69c 100644 --- a/src/api/icons.rs +++ b/src/api/icons.rs @@ -61,14 +61,7 @@ fn icon(domain: String) -> Content> { return Content(icon_type, FALLBACK_ICON.to_vec()); } - if check_icon_domain_is_blacklisted(&domain) { - warn!("Domain is blacklisted: {:#?}", domain); - return Content(icon_type, FALLBACK_ICON.to_vec()); - } - - let icon = get_icon(&domain); - - Content(icon_type, icon) + Content(icon_type, get_icon(&domain)) } fn check_icon_domain_is_blacklisted(domain: &str) -> bool { @@ -380,6 +373,10 @@ fn parse_sizes(sizes: Option) -> (u16, u16) { } fn download_icon(domain: &str) -> Result, Error> { + if check_icon_domain_is_blacklisted(domain) { + err!("Domain is blacklisted", domain) + } + let (iconlist, cookie_str) = get_icon_url(&domain)?; let mut buffer = Vec::new();