File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ pub(crate) async fn get(url: &str) -> oxfeed::Result<Vec<u8>> {
10
10
11
11
content
12
12
} else {
13
- use std:: io:: Write ;
13
+ use std:: io:: Write as _ ;
14
14
15
15
let content = reqwest:: get ( url) . await ?. bytes ( ) . await ?;
16
16
std:: fs:: create_dir_all ( path. parent ( ) . unwrap ( ) ) ?;
Original file line number Diff line number Diff line change @@ -9,14 +9,17 @@ pub(crate) fn scope() -> actix_web::Scope {
9
9
10
10
#[ actix_web:: get( "/{url:.*}" ) ]
11
11
async fn icon ( url : actix_web:: web:: Path < String > ) -> oxfeed:: Result < actix_web:: HttpResponse > {
12
- use base64:: Engine ;
12
+ use base64:: Engine as _ ;
13
13
14
14
let url = base64:: engine:: general_purpose:: STANDARD . decode ( url. into_inner ( ) ) ?;
15
15
let icon = String :: from_utf8 ( url) ?;
16
16
17
17
let body = match crate :: cache:: get ( & icon) . await {
18
18
Ok ( body) => body,
19
- Err ( _) => EMPTY_IMG . to_vec ( ) ,
19
+ Err ( err) => {
20
+ log:: error!( "Unable to get icon: {err}" ) ;
21
+ EMPTY_IMG . to_vec ( )
22
+ }
20
23
} ;
21
24
22
25
let mut mime = tree_magic_mini:: from_u8 ( & body) ;
You can’t perform that action at this time.
0 commit comments