Skip to content

Commit

Permalink
renaming type-script to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
tanneberger committed Dec 18, 2023
1 parent 68314d4 commit 67a1c2f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -78,19 +79,14 @@ impl BuildArgs {
}
}

impl ToString for TargetLanguage {
fn to_string(&self) -> String {
format!("{:?}", self)
}
}

#[derive(Args, Debug)]
pub struct InitArgs {
#[clap(value_enum, short, long)]
pub language: Option<TargetLanguage>,
#[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({
Expand Down Expand Up @@ -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,
}

0 comments on commit 67a1c2f

Please sign in to comment.