diff --git a/src/api.rs b/src/api.rs index b912fb7..e4678ba 100644 --- a/src/api.rs +++ b/src/api.rs @@ -48,14 +48,6 @@ impl From 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), diff --git a/src/error.rs b/src/error.rs index 404d1ae..b9f459f 100644 --- a/src/error.rs +++ b/src/error.rs @@ -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"),