diff options
Diffstat (limited to 'src/libtest/cli.rs')
| -rw-r--r-- | src/libtest/cli.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libtest/cli.rs b/src/libtest/cli.rs index aac454c023c..0cec8050c27 100644 --- a/src/libtest/cli.rs +++ b/src/libtest/cli.rs @@ -331,7 +331,7 @@ fn get_format( quiet: bool, allow_unstable: bool, ) -> OptPartRes<OutputFormat> { - let format = match matches.opt_str("format").as_ref().map(|s| &**s) { + let format = match matches.opt_str("format").as_deref() { None if quiet => OutputFormat::Terse, Some("pretty") | None => OutputFormat::Pretty, Some("terse") => OutputFormat::Terse, @@ -355,7 +355,7 @@ fn get_format( } fn get_color_config(matches: &getopts::Matches) -> OptPartRes<ColorConfig> { - let color = match matches.opt_str("color").as_ref().map(|s| &**s) { + let color = match matches.opt_str("color").as_deref() { Some("auto") | None => ColorConfig::AutoColor, Some("always") => ColorConfig::AlwaysColor, Some("never") => ColorConfig::NeverColor, |
