mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 14:54:15 +00:00
Fix warnings
This commit is contained in:
parent
12e8541678
commit
41c4d186f1
2 changed files with 7 additions and 3 deletions
|
@ -471,7 +471,7 @@ impl<'a> From<&'a Yaml> for ArgGroup<'a> {
|
|||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::{ArgGroup, Id};
|
||||
use super::ArgGroup;
|
||||
#[cfg(feature = "yaml")]
|
||||
use yaml_rust::YamlLoader;
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use clap::{App, Arg};
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
#[test]
|
||||
#[should_panic = "Argument names must be unique, but 'arg1' is in use by more than one argument or group"]
|
||||
fn unique_arg_names() {
|
||||
use clap::{App, Arg};
|
||||
|
||||
let _ = App::new("some")
|
||||
.args(&[Arg::new("arg1").short('a'), Arg::new("arg1").short('b')])
|
||||
.try_get_matches();
|
||||
|
@ -13,6 +13,8 @@ fn unique_arg_names() {
|
|||
#[test]
|
||||
#[should_panic = "Short option names must be unique for each argument, but '-a' is in use by both 'arg1' and 'arg2'"]
|
||||
fn unique_arg_shorts() {
|
||||
use clap::{App, Arg};
|
||||
|
||||
let _ = App::new("some")
|
||||
.args(&[Arg::new("arg1").short('a'), Arg::new("arg2").short('a')])
|
||||
.try_get_matches();
|
||||
|
@ -22,6 +24,8 @@ fn unique_arg_shorts() {
|
|||
#[test]
|
||||
#[should_panic = "Long option names must be unique for each argument, but '--long' is in use by both 'arg1' and 'arg2'"]
|
||||
fn unique_arg_longs() {
|
||||
use clap::{App, Arg};
|
||||
|
||||
let _ = App::new("some")
|
||||
.args(&[Arg::new("arg1").long("long"), Arg::new("arg2").long("long")])
|
||||
.try_get_matches();
|
||||
|
|
Loading…
Reference in a new issue