Skip to content
Snippets Groups Projects
Commit 28966e47 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Merge branch 'fix-description-deprecation' into 'master'

Fix description deprecation warnings

See merge request redox-os/pkgutils!38
parents 78967039 5a6dcad4
No related branches found
No related tags found
1 merge request!38Fix description deprecation warnings
......@@ -37,23 +37,7 @@ impl fmt::Display for DatabaseError {
}
}
impl error::Error for DatabaseError {
fn description(&self) -> &str {
match *self {
DatabaseError::Io(ref err) => err.description(),
DatabaseError::Toml(ref err) => err.description(),
DatabaseError::Cycle(_) => "Cyclic dependency",
}
}
fn cause(&self) -> Option<&dyn error::Error> {
match *self {
DatabaseError::Io(ref err) => Some(err),
DatabaseError::Toml(ref err) => Some(err),
DatabaseError::Cycle(_) => None,
}
}
}
impl error::Error for DatabaseError {}
impl From<io::Error> for DatabaseError {
fn from(err: io::Error) -> DatabaseError {
......
use std::error::Error;
use std::fs::File;
use std::io::{self, stderr, Read, Write};
use std::time::Duration;
......@@ -23,7 +22,7 @@ pub fn download(remote_path: &str, local_path: &str) -> io::Result<()> {
let mut response = match client.get(remote_path).send() {
Ok(response) => response,
Err(HyperError::Io(err)) => return Err(err),
Err(err) => return Err(io::Error::new(io::ErrorKind::Other, err.description())),
Err(err) => return Err(io::Error::new(io::ErrorKind::Other, err)),
};
match response.status {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment