Skip to content

Commit 46a1893

Browse files
augustuswmkavin-kr
authored andcommitted
Build clients
1 parent ebc79fd commit 46a1893

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

github/src/http_cache.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ use std::{
99
path::{Path, PathBuf},
1010
};
1111

12-
use crate::ClientResult;
1312
use crate::ClientError;
13+
use crate::ClientResult;
1414
use 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

194194
fn 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`

github/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff 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),

0 commit comments

Comments
 (0)