From 006dc284669c4119fd6e44dbb30eb2c3c8ade4bf Mon Sep 17 00:00:00 2001 From: Ahurac Date: Fri, 19 Apr 2024 15:46:49 +0200 Subject: [PATCH] exit_code : suppression argument new --- src/control.rs | 2 +- src/exit_code.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/control.rs b/src/control.rs index 60e979c..42a2be3 100644 --- a/src/control.rs +++ b/src/control.rs @@ -6,7 +6,7 @@ use crate::parser::parse; use crate::variables::Variables; pub fn run() { - let mut current_exit_code = ExitCode::new(0); + let mut current_exit_code = ExitCode::new(); let mut variables = Variables::new(); loop { diff --git a/src/exit_code.rs b/src/exit_code.rs index 79af0c3..4c0b5a7 100644 --- a/src/exit_code.rs +++ b/src/exit_code.rs @@ -3,8 +3,8 @@ pub struct ExitCode { } impl ExitCode { - pub fn new(exit_code: u8) -> Self { - Self { exit_code } + pub fn new() -> Self { + Self { exit_code: 0 } } pub fn get(&self) -> u8 {