Skip to content

Commit

Permalink
clippy run
Browse files Browse the repository at this point in the history
  • Loading branch information
lexa-diky committed Jul 10, 2024
1 parent e051305 commit de43af1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl Cli {

impl ValueEnum for LogLevel {
fn value_variants<'a>() -> &'a [Self] {
return &[Self::Debug, Self::Info, Self::Warn, Self::Error, Self::None]
&[Self::Debug, Self::Info, Self::Warn, Self::Error, Self::None]
}

fn to_possible_value(&self) -> Option<PossibleValue> {
Expand All @@ -156,7 +156,7 @@ impl ValueEnum for LogLevel {
LogLevel::None => { "none" }
};

return Some(
Some(
PossibleValue::new(name)
)
}
Expand Down
2 changes: 2 additions & 0 deletions src/compiler/cst/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ use crate::compiler::cst::{
CstActualParameter, CstAtom, CstConstantStatement, CstEmitStatement, CstFunctionStatement,
};
use crate::match_ast;
use crate::util::logger;

#[derive(Default)]
pub(crate) struct CstParser {}

impl CstParser {
pub(crate) fn parse(&self, path: &Path, ast_root: AstNode) -> Result<CstFile, Error> {
logger::debug!("Parsing CST of {:?}", path);
parse_file(path, &ast_root)
}
}
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/compiler/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mod compilation_result;
mod compiler;
mod hexo_compiler;
mod compiler_context;
mod compiler_source;
mod error;
Expand All @@ -9,7 +9,7 @@ mod cst;
mod ast;

pub(crate) use compilation_result::Compilation;
pub(crate) use compiler::HexoCompiler;
pub(crate) use hexo_compiler::HexoCompiler;
pub(crate) use compiler_context::HexoCompilerContext;
pub(crate) use compiler_source::{CompilerSource, FileCompilerSource};
pub(crate) use error::Error;
2 changes: 1 addition & 1 deletion src/util/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub(crate) struct HexoLogger {

impl HexoLogger {
pub(crate) fn level(&self) -> &LogLevel {
return &self.level;
&self.level
}

pub(crate) fn set_level(level: LogLevel) {
Expand Down

0 comments on commit de43af1

Please sign in to comment.