Skip to content

Commit

Permalink
apply clippy changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Caznix committed Dec 6, 2024
1 parent 8d1f838 commit e4a45ee
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion engine/src/core/renderer/ctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl<'window> WgpuCtx<'window> {
.device
.create_command_encoder(&wgpu::CommandEncoderDescriptor { label: None });
{
let mut rpass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
let rpass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
label: None,
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
view: &view,
Expand Down
2 changes: 1 addition & 1 deletion engine/src/core/repl/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use lazy_static::lazy_static;
use parking_lot::Mutex;

use super::COMMAND_LIST;
use crate::core::repl::repl::evaluate_command;
use crate::core::repl::exec::evaluate_command;
const MAX_RECURSION_DEPTH: usize = 500; // increasing this value WILL cause a stack overflow. attempt at your own risk -
// Caz

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion engine/src/core/repl/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pub mod commands;
pub mod repl;
pub mod exec;

use std::{borrow::Borrow, collections::HashMap, sync::Arc};

Expand Down
4 changes: 2 additions & 2 deletions engine/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ async fn main() -> Result<()> {

LOGGER.write_to_stdout();

let shell_thread = tokio::task::spawn(async { core::repl::repl::handle_repl().await });
let shell_thread = tokio::task::spawn(async { core::repl::exec::handle_repl().await });

core::init_renderer()?;
let _ = shell_thread.await??;
shell_thread.await??;

Ok(())
}
8 changes: 7 additions & 1 deletion engine/src/utils/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ pub struct DynamicLogger {
pub writer: Arc<Mutex<Box<dyn Write + Send>>>,
}

impl Default for DynamicLogger {
fn default() -> Self {
Self::new()
}
}

impl DynamicLogger {
pub fn new() -> Self {
Self {
Expand All @@ -24,7 +30,7 @@ impl DynamicLogger {
pub fn write_to_file(&self, file_path: &str) {
let file = OpenOptions::new()
.create(true)
.write(true)

.append(true)
.open(file_path)
.expect("Failed to open log file");
Expand Down

0 comments on commit e4a45ee

Please sign in to comment.