diff --git a/src/files/path.rs b/src/files/path.rs index 0328037222c3f497ef673c7a352d0b9211cedbd6..fd9adcf4a248e35fd81d339b26196d44877fca46 100644 --- a/src/files/path.rs +++ b/src/files/path.rs @@ -10,16 +10,12 @@ pub enum PathError { }, #[error("Path has no parent")] NoParent, - #[error("Path is relative")] - RelativePath, #[error("Unable to canonicalize path (Path: {}, Source: {})", path.display(), source)] Canonicalize { path: PathBuf, #[source] source: std::io::Error, }, - #[error("Path is out of bounds")] - PathOutOfBounds, } /// Resolves a path relative to the current path or to the base path. diff --git a/src/files/service.rs b/src/files/service.rs index 1599a6e7b32acf5feb621b3bb013baffb4b165d0..ff9efd68e22f516aeb65ea8981e29856a6258a1c 100644 --- a/src/files/service.rs +++ b/src/files/service.rs @@ -33,10 +33,6 @@ use tokio::sync::RwLock; /// Errors which can occur when serving static files. #[derive(Debug, Error)] pub enum ServiceError { - /// Path is not a directory - #[error("Path is not a directory. Unable to serve static files")] - IsNotDirectory, - /// Cannot render directory #[error("Unable to render directory without index file")] IsDirectory, @@ -44,9 +40,6 @@ pub enum ServiceError { #[error("Serve directory is not ready.")] ServeDirNotReady, - #[error("Unable to obtain read lock for serve dir.")] - ServerDirReadLockFail, - #[error("Unable to find or open the specified file.")] OpenFile { #[source] @@ -71,15 +64,6 @@ pub enum ServiceError { #[error("Unable to render listing")] RenderListing { source: io::Error }, - #[error("Unable to reconstruct request")] - ReconstructRequest, - - #[error("Unable to build file response")] - BuildFileResponse { - #[source] - source: ActixError, - }, - #[error("Custom path not found")] ServeCustomNotFoundPath, }