Skip to main content

Try to get it working with the new version of clap

ID
f873ce6
date
2024-06-03 21:00:33+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
8873d08
message
Try to get it working with the new version of clap
changed files
1 file, 3 additions, 3 deletions

Changed files

src/main.rs (2184) → src/main.rs (2175)

diff --git a/src/main.rs b/src/main.rs
index 5f0331d..b188fb6 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -3,7 +3,7 @@
 use std::cmp::Ordering::Equal;
 use std::str::FromStr;
 
-use clap::{App, Arg};
+use clap::Arg;
 use palette::{FromColor, Hsv, Srgb};
 
 const VERSION: &str = env!("CARGO_PKG_VERSION");
@@ -16,12 +16,12 @@ struct OutputValue {
 }
 
 fn main() {
-    let matches = App::new("brightness_adjust")
+    let matches = Command::new("brightness_adjust")
         .version(VERSION)
         .author("Alex Chan <alex@alexwlchan.net>")
         .about("Show some darker/lighter variants of a given colour")
         .arg(
-            Arg::with_name("COLOUR")
+            Arg::new("COLOUR")
                 .help("colour to start with as a hex string, e.g. #d01c11")
                 .required(true)
                 .index(1),