Skip to content

Commit

Permalink
fix: Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
can-keklik committed Jun 29, 2024
1 parent a8181b4 commit f5f9b45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 4 additions & 1 deletion lykiadb-server/src/lang/parser/program.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
use serde_json::Value;

use crate::{engine::interpreter::Locals, lang::ast::{expr::Expr, stmt::Stmt}};
use crate::{
engine::interpreter::Locals,
lang::ast::{expr::Expr, stmt::Stmt},
};
pub struct Program {
root: Box<Stmt>,
locals: Option<Locals>,
Expand Down
6 changes: 2 additions & 4 deletions lykiadb-server/src/lang/parser/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ pub enum ResolveError {
}

impl<'a> Resolver<'a> {
pub fn resolve(
&mut self,
) -> Result<(Scopes, Locals), ResolveError> {
pub fn resolve(&mut self) -> Result<(Scopes, Locals), ResolveError> {
self.visit_stmt(&self.program.get_root())?;
let scopes = self.scopes.clone();
let locals = self.locals.clone();
Expand All @@ -37,7 +35,7 @@ impl<'a> Resolver<'a> {
) -> Resolver<'a> {
Resolver {
scopes,
locals: if let Some(previous_locals) = previous_locals{
locals: if let Some(previous_locals) = previous_locals {
previous_locals
} else {
FxHashMap::default()
Expand Down

0 comments on commit f5f9b45

Please sign in to comment.