File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ use std::{
99 path:: { Path , PathBuf } ,
1010} ;
1111
12- use crate :: ClientResult ;
1312use crate :: ClientError ;
13+ use crate :: ClientResult ;
1414use http:: Uri ;
1515
1616/// A type for an HTTP cache.
@@ -192,7 +192,10 @@ fn read_to_string<P: AsRef<Path>>(path: P) -> ClientResult<String> {
192192}
193193
194194fn no_read < T , E : Into < Box < dyn std:: error:: Error + Send + Sync > > > ( error : E ) -> ClientResult < T > {
195- Err ( ClientError :: IoError ( io:: Error :: new ( io:: ErrorKind :: NotFound , error) ) )
195+ Err ( ClientError :: IoError ( io:: Error :: new (
196+ io:: ErrorKind :: NotFound ,
197+ error,
198+ ) ) )
196199}
197200
198201// Separate to provide a blanket implementation for `T: HttpCache + Clone`
Original file line number Diff line number Diff line change @@ -255,6 +255,11 @@ pub enum ClientError {
255255 /// JWT errors from auth.rs
256256 #[ error( transparent) ]
257257 JsonWebTokenError ( #[ from] jsonwebtoken:: errors:: Error ) ,
258+ /// IO Errors
259+ #[ cfg( feature = "httpcache" ) ]
260+ #[ error( transparent) ]
261+ #[ cfg( feature = "httpcache" ) ]
262+ IoError ( #[ from] std:: io:: Error ) ,
258263 /// URL Parsing Error
259264 #[ error( transparent) ]
260265 UrlParserError ( #[ from] url:: ParseError ) ,
You can’t perform that action at this time.
0 commit comments