From 584fe70ed645b161c22bc8ceb537eaacddcb0cd0 Mon Sep 17 00:00:00 2001 From: WilliamRagstad Date: Mon, 28 Oct 2024 17:24:53 +0100 Subject: [PATCH] Move config version --- src/args.rs | 6 +++--- src/commands/files.rs | 8 ++++---- src/conf.rs | 1 - src/main.rs | 3 ++- 4 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 src/conf.rs diff --git a/src/args.rs b/src/args.rs index 38d04f5..8f2059b 100644 --- a/src/args.rs +++ b/src/args.rs @@ -1,10 +1,10 @@ -use chrono; use chrono::Datelike; use clap::{arg, Command}; use colorful::{Color, Colorful}; -use crate::conf::CLI_VERSION; -use lento_core::conf::LANG_VERSION; +use lento_core::LANG_VERSION; + +use crate::CLI_VERSION; const MASCOT: &str = r#" _...---..._ diff --git a/src/commands/files.rs b/src/commands/files.rs index e87e0fc..857395d 100644 --- a/src/commands/files.rs +++ b/src/commands/files.rs @@ -22,7 +22,7 @@ use crate::error::{print_error, print_error_usage}; /** * Check that all input files exists. * If the first file doesn't have a file extension and also does not exist, throw an error for invalid subcommand. - * Will exit the program if any error occured. + * Will exit the program if any error occurred. */ fn validate_files(files: &Vec<&Path>, arg_parser: &mut Command) { let mut is_first = true; @@ -72,14 +72,14 @@ fn parse_files<'a>(files: &Vec<&'a Path>) -> Vec<(&'a Path, Module)> { }) .collect(); if results.len() < files.len() { - print_error("One or more errors occured during parsing!".to_string()); + print_error("One or more errors occurred during parsing!".to_string()); exit(1); } results } /** - * Interpret all files in order and exit the program if any runtime error occured. + * Interpret all files in order and exit the program if any runtime error occurred. */ fn interpret_parse_results(parse_results: Vec<(&Path, Module)>) -> Failable> { // Interpret all files in order. Unwrap is safe because we already checked for errors in the parse_results function @@ -102,7 +102,7 @@ fn interpret_parse_results(parse_results: Vec<(&Path, Module)>) -> Failable