@@ -5,7 +5,6 @@ use std::{fs, io};
5
5
use anyhow:: Context ;
6
6
use clap:: { arg, value_parser, ArgAction , ArgMatches , Command } ;
7
7
use crossterm:: tty:: IsTty ;
8
- use regex;
9
8
use superconsole:: { Component , Line , Lines , Span } ;
10
9
use yansi:: Color :: { Green , Red , Yellow } ;
11
10
use yansi:: Paint ;
@@ -115,7 +114,7 @@ pub fn exec_check(args: &ArgMatches, config: &Config) -> anyhow::Result<()> {
115
114
MetaValueType :: String => {
116
115
let message = if let Some ( regexp) = & config. regexp {
117
116
// Make sure that the regexp is valid.
118
- let _ = regex:: bytes:: Regex :: new ( & regexp) ?;
117
+ let _ = regex:: bytes:: Regex :: new ( regexp) ?;
119
118
format ! ( "`{identifier}` must be a string that matches `/{regexp}/`" )
120
119
} else {
121
120
format ! ( "`{identifier}` must be a string" )
@@ -124,10 +123,10 @@ pub fn exec_check(args: &ArgMatches, config: &Config) -> anyhow::Result<()> {
124
123
|meta| {
125
124
match ( & meta. value , & config. regexp ) {
126
125
( MetaValue :: String ( ( s, _) ) , Some ( regexp) ) => {
127
- regex:: Regex :: new ( & regexp) . unwrap ( ) . is_match ( s)
126
+ regex:: Regex :: new ( regexp) . unwrap ( ) . is_match ( s)
128
127
}
129
128
( MetaValue :: Bytes ( ( s, _) ) , Some ( regexp) ) => {
130
- regex:: bytes:: Regex :: new ( & regexp) . unwrap ( ) . is_match ( s)
129
+ regex:: bytes:: Regex :: new ( regexp) . unwrap ( ) . is_match ( s)
131
130
}
132
131
( MetaValue :: String ( _) , None ) => true ,
133
132
( MetaValue :: Bytes ( _) , None ) => true ,
0 commit comments