Skip to content

Commit

Permalink
update to latestst clap beta (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkna authored Oct 17, 2021
1 parent b920352 commit 73493b0
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 25 deletions.
44 changes: 25 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ default = ["clap"]

[dependencies]
bstr = "0.2.17"
clap = { version = "3.0.0-beta.4", optional = true }
clap = { version = "3.0.0-beta.5", optional = true }
colorgrad = "0.5.0"
fastrand = "1.5.0"
unicode-segmentation = "1.8.0"
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![warn(clippy::pedantic, clippy::nursery)]

use clap::Clap;
use clap::Parser;
use lcat::{Rainbow, RainbowCmd};
use std::{
fs::File,
Expand All @@ -12,7 +12,7 @@ use std::{
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;

#[derive(Clap)]
#[derive(Parser)]
#[clap(name = "lcat", about = "Terminal rainbows.")]
pub struct Cmdline {
#[clap(name = "File", default_value = "-", parse(from_os_str))]
Expand Down
6 changes: 3 additions & 3 deletions src/rainbow_cmd.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
use crate::{Grad, HsvGrad, Rainbow};
use clap::{ArgEnum, Clap};
use clap::{ArgEnum, Parser};

#[derive(Debug, ArgEnum)]
#[derive(Debug, Clone, ArgEnum)]
pub enum RainbowStyle {
Rainbow,
Sinebow,
OkHsv,
}

#[derive(Debug, Clap)]
#[derive(Debug, Parser)]
pub struct RainbowCmd {
/// How many degrees to shift text color hue for every column
#[clap(short = 'C', long, default_value = "1.6")]
Expand Down

0 comments on commit 73493b0

Please sign in to comment.