@@ -20,7 +20,7 @@ fn default_options() {
2020
2121#[ test]
2222fn good_options ( ) {
23- let o = Opts :: parse_from ( & [
23+ let o = Opts :: parse_from ( [
2424 "test" ,
2525 "-q" ,
2626 "-p" ,
@@ -48,7 +48,7 @@ fn good_options() {
4848fn unexpected_option ( ) {
4949 assert ! (
5050 Opts :: command( )
51- . try_get_matches_from( & [ "test" , "unexpected" ] )
51+ . try_get_matches_from( [ "test" , "unexpected" ] )
5252 . is_err( )
5353 ) ;
5454}
@@ -57,7 +57,7 @@ fn unexpected_option() {
5757fn unexpected_flag ( ) {
5858 assert ! (
5959 Opts :: command( )
60- . try_get_matches_from( & [ "test" , "--flag" ] )
60+ . try_get_matches_from( [ "test" , "--flag" ] )
6161 . is_err( )
6262 ) ;
6363}
@@ -66,19 +66,19 @@ fn unexpected_flag() {
6666fn mandatory_separator ( ) {
6767 assert ! (
6868 Opts :: command( )
69- . try_get_matches_from( & [ "test" , "--emit" ] )
69+ . try_get_matches_from( [ "test" , "--emit" ] )
7070 . is_err( )
7171 ) ;
7272 assert ! (
7373 Opts :: command( )
74- . try_get_matches_from( & [ "test" , "--" , "--emit" ] )
74+ . try_get_matches_from( [ "test" , "--" , "--emit" ] )
7575 . is_ok( )
7676 ) ;
7777}
7878
7979#[ test]
8080fn multiple_packages_one_by_one ( ) {
81- let o = Opts :: parse_from ( & [
81+ let o = Opts :: parse_from ( [
8282 "test" ,
8383 "-p" ,
8484 "package1" ,
@@ -92,7 +92,7 @@ fn multiple_packages_one_by_one() {
9292
9393#[ test]
9494fn multiple_packages_grouped ( ) {
95- let o = Opts :: parse_from ( & [
95+ let o = Opts :: parse_from ( [
9696 "test" ,
9797 "--package" ,
9898 "package1" ,
@@ -108,7 +108,7 @@ fn multiple_packages_grouped() {
108108fn empty_packages_1 ( ) {
109109 assert ! (
110110 Opts :: command( )
111- . try_get_matches_from( & [ "test" , "-p" ] )
111+ . try_get_matches_from( [ "test" , "-p" ] )
112112 . is_err( )
113113 ) ;
114114}
@@ -117,7 +117,7 @@ fn empty_packages_1() {
117117fn empty_packages_2 ( ) {
118118 assert ! (
119119 Opts :: command( )
120- . try_get_matches_from( & [ "test" , "-p" , "--" , "--check" ] )
120+ . try_get_matches_from( [ "test" , "-p" , "--" , "--check" ] )
121121 . is_err( )
122122 ) ;
123123}
@@ -126,7 +126,7 @@ fn empty_packages_2() {
126126fn empty_packages_3 ( ) {
127127 assert ! (
128128 Opts :: command( )
129- . try_get_matches_from( & [ "test" , "-p" , "--verbose" ] )
129+ . try_get_matches_from( [ "test" , "-p" , "--verbose" ] )
130130 . is_err( )
131131 ) ;
132132}
@@ -135,7 +135,7 @@ fn empty_packages_3() {
135135fn empty_packages_4 ( ) {
136136 assert ! (
137137 Opts :: command( )
138- . try_get_matches_from( & [ "test" , "-p" , "--check" ] )
138+ . try_get_matches_from( [ "test" , "-p" , "--check" ] )
139139 . is_err( )
140140 ) ;
141141}
0 commit comments