mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
Groupsmigration compiles
This commit is contained in:
@@ -269,11 +269,15 @@ pub enum Error {
|
||||
|
||||
/// Indicates an HTTP repsonse with a non-success status code
|
||||
Failure(hyper::Response<hyper::body::Body>),
|
||||
|
||||
/// An IO error occurred while reading a stream into memory
|
||||
Io(std::io::Error),
|
||||
}
|
||||
|
||||
impl Display for Error {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match *self {
|
||||
Error::Io(ref err) => err.fmt(f),
|
||||
Error::HttpError(ref err) => err.fmt(f),
|
||||
Error::UploadSizeLimitExceeded(ref resource_size, ref max_size) => writeln!(
|
||||
f,
|
||||
@@ -335,6 +339,12 @@ impl error::Error for Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<std::io::Error> for Error {
|
||||
fn from(err: std::io::Error) -> Self {
|
||||
Error::Io(err)
|
||||
}
|
||||
}
|
||||
|
||||
/// A universal result type used as return for all calls.
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
@@ -593,7 +603,7 @@ impl RangeResponseHeader {
|
||||
}
|
||||
}
|
||||
|
||||
panic!(format!("Unable to parse Range header {:?}", raw))
|
||||
panic!("Unable to parse Range header {:?}", raw)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user