clippy+fmt

This commit is contained in:
Anton-4 2022-03-07 19:59:45 +01:00
parent ec1e2cd1d0
commit c8fd1836c9
No known key found for this signature in database
GPG key ID: C954D6E0F9C0ABFD
27 changed files with 1949 additions and 1562 deletions

View file

@ -2,7 +2,7 @@ use peg::error::ParseError;
use roc_ast::ast_error::ASTError;
use roc_module::module_err::ModuleError;
use roc_parse::parser::SyntaxError;
use snafu::{Snafu};
use snafu::Snafu;
#[derive(Debug, Snafu)]
#[snafu(visibility(pub))]
@ -28,7 +28,9 @@ pub type DocsResult<T, E = DocsError> = std::result::Result<T, E>;
impl<'a> From<SyntaxError<'a>> for DocsError {
fn from(syntax_err: SyntaxError) -> Self {
Self::WrapSyntaxError { msg: format!("{:?}", syntax_err) }
Self::WrapSyntaxError {
msg: format!("{:?}", syntax_err),
}
}
}
@ -46,6 +48,8 @@ impl From<ModuleError> for DocsError {
impl From<ParseError<usize>> for DocsError {
fn from(peg_parse_err: ParseError<usize>) -> Self {
Self::WrapPegParseError { source: peg_parse_err }
Self::WrapPegParseError {
source: peg_parse_err,
}
}
}