Add URL parsing.
This commit is contained in:
@@ -16,6 +16,7 @@ pub(crate) enum CustomError {
|
||||
DusterCompile(duster::renderer::CompileError),
|
||||
DusterRender(duster::renderer::RenderError),
|
||||
PathStripPrefix(std::path::StripPrefixError),
|
||||
UrlParseError(url::ParseError),
|
||||
}
|
||||
|
||||
impl From<std::io::Error> for CustomError {
|
||||
@@ -95,3 +96,9 @@ impl From<std::path::StripPrefixError> for CustomError {
|
||||
CustomError::PathStripPrefix(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<url::ParseError> for CustomError {
|
||||
fn from(value: url::ParseError) -> Self {
|
||||
CustomError::UrlParseError(value)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user