Removed redundant errors

This commit is contained in:
Antoine Gersant 2016-11-21 00:15:05 -08:00
parent 431852f1e0
commit a0b89d5acf
2 changed files with 0 additions and 32 deletions

View file

@ -48,14 +48,6 @@ impl From<PError> for IronError {
PError::PathNotInVfs => IronError::new(err, status::NotFound),
PError::CannotServeDirectory => IronError::new(err, status::BadRequest),
PError::UnsupportedFileType => IronError::new(err, status::BadRequest),
PError::ConfigFileOpenError => IronError::new(err, status::InternalServerError),
PError::ConfigFileReadError => IronError::new(err, status::InternalServerError),
PError::ConfigFileParseError => IronError::new(err, status::InternalServerError),
PError::ConfigMountDirsParseError => IronError::new(err, status::InternalServerError),
PError::ConfigUsersParseError => IronError::new(err, status::InternalServerError),
PError::ConfigAlbumArtPatternParseError => {
IronError::new(err, status::InternalServerError)
}
PError::AlbumArtSearchError => IronError::new(err, status::InternalServerError),
PError::ImageProcessingError => IronError::new(err, status::InternalServerError),
PError::UnsupportedMetadataFormat => IronError::new(err, status::InternalServerError),

View file

@ -17,12 +17,6 @@ pub enum PError {
PathNotInVfs,
CannotServeDirectory,
UnsupportedFileType,
ConfigFileOpenError,
ConfigFileReadError,
ConfigFileParseError,
ConfigMountDirsParseError,
ConfigUsersParseError,
ConfigAlbumArtPatternParseError,
AlbumArtSearchError,
ImageProcessingError,
UnsupportedMetadataFormat,
@ -78,14 +72,6 @@ impl error::Error for PError {
PError::PathNotInVfs => "Requested path does not index a mount point",
PError::CannotServeDirectory => "Only individual files can be served",
PError::UnsupportedFileType => "Unrecognized extension",
PError::ConfigFileOpenError => "Could not open config file",
PError::ConfigFileReadError => "Could not read config file",
PError::ConfigFileParseError => "Could not parse config file",
PError::ConfigMountDirsParseError => "Could not parse mount directories in config file",
PError::ConfigUsersParseError => "Could not parse users in config file",
PError::ConfigAlbumArtPatternParseError => {
"Could not parse album art pattern in config file"
}
PError::AlbumArtSearchError => "Error while looking for album art",
PError::ImageProcessingError => "Error while processing image",
PError::UnsupportedMetadataFormat => "Unsupported metadata format",
@ -114,16 +100,6 @@ impl fmt::Display for PError {
PError::PathNotInVfs => write!(f, "Requested path does not index a mount point"),
PError::CannotServeDirectory => write!(f, "Only individual files can be served"),
PError::UnsupportedFileType => write!(f, "Unrecognized extension"),
PError::ConfigFileOpenError => write!(f, "Could not open config file"),
PError::ConfigFileReadError => write!(f, "Could not read config file"),
PError::ConfigFileParseError => write!(f, "Could not parse config file"),
PError::ConfigUsersParseError => write!(f, "Could not parse users in config file"),
PError::ConfigMountDirsParseError => {
write!(f, "Could not parse mount directories in config file")
}
PError::ConfigAlbumArtPatternParseError => {
write!(f, "Could not album art pattern in config file")
}
PError::AlbumArtSearchError => write!(f, "Error while looking for album art"),
PError::ImageProcessingError => write!(f, "Error while processing image"),
PError::UnsupportedMetadataFormat => write!(f, "Unsupported metadata format"),