Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions metadata/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::fmt;
use std::io;
use std::path::{Path, PathBuf};
use std::process::Command;
use std::str::{self, Utf8Error};
use std::str::Utf8Error;

#[derive(Debug)]
pub enum ErrorKind {
Expand All @@ -34,16 +34,7 @@ impl fmt::Display for ErrorKind {
}
}

impl Error for ErrorKind {
fn description(&self) -> &str {
match self {
ErrorKind::Encode(e) => e.description(),
ErrorKind::Json(e) => e.description(),
ErrorKind::Io(e) => e.description(),
ErrorKind::Subprocess(s) => &s,
}
}
}
impl Error for ErrorKind {}

impl From<Utf8Error> for ErrorKind {
fn from(e: Utf8Error) -> ErrorKind {
Expand Down