Derive debug

This commit is contained in:
Wilco Kusee 2020-01-08 17:21:19 +01:00
parent 003620f0d6
commit 738d5a7ec2
No known key found for this signature in database
GPG Key ID: D5B2BB5CDC3334BC

View File

@ -25,7 +25,7 @@ pub use crate::{
pub type Result<T> = ::std::result::Result<T, Box<dyn Error + Send + Sync>>;
#[derive(Clone, PartialEq, Eq, Hash)]
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub struct CargoTomlNotFoundError(pub PathBuf);
impl std::fmt::Display for CargoTomlNotFoundError {
@ -34,12 +34,6 @@ impl std::fmt::Display for CargoTomlNotFoundError {
}
}
impl std::fmt::Debug for CargoTomlNotFoundError {
fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(fmt, "can't find Cargo.toml at {}", self.0.display())
}
}
impl Error for CargoTomlNotFoundError {}
#[derive(Debug, Clone)]