From 67a1c2f33e61702bc46e9b22e2172a5106371190 Mon Sep 17 00:00:00 2001 From: revol-xut Date: Mon, 18 Dec 2023 19:33:46 +0100 Subject: [PATCH] renaming type-script to typescript --- src/args.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/args.rs b/src/args.rs index 0149425..3d8311d 100644 --- a/src/args.rs +++ b/src/args.rs @@ -4,6 +4,7 @@ use serde_derive::{Deserialize, Serialize}; use std::path::PathBuf; #[derive(clap::ValueEnum, Clone, Copy, Debug, Deserialize, Serialize, PartialEq)] +#[clap(rename_all = "lowercase")] pub enum TargetLanguage { C, Cpp, @@ -78,12 +79,6 @@ impl BuildArgs { } } -impl ToString for TargetLanguage { - fn to_string(&self) -> String { - format!("{:?}", self) - } -} - #[derive(Args, Debug)] pub struct InitArgs { #[clap(value_enum, short, long)] @@ -91,6 +86,7 @@ pub struct InitArgs { #[clap(value_enum, short, long, default_value_t = Platform::Native)] pub platform: Platform, } + impl InitArgs { pub fn get_target_language(&self) -> TargetLanguage { self.language.unwrap_or({ @@ -137,7 +133,7 @@ pub struct CommandLineArgs { #[clap(short, long, action)] pub quiet: bool, - /// lingo wouldn't produce any output + /// lingo will give more detailed feedback #[clap(short, long, action)] pub verbose: bool, }