@@ -29,15 +29,7 @@ def gen_examples(manifest):
2929 yield dir_ / manifest
3030
3131
32- LINT_CONFIG = (
33- "--deny" ,
34- "warnings" ,
35- # We usually want to make the GIL lifetime explicit.
36- "--deny" ,
37- "elided-lifetimes-in-paths" ,
38- "--allow" ,
39- "clippy::needless-lifetimes" ,
40- )
32+ DENY_WARNINGS = ("--deny" , "warnings" )
4133
4234
4335def default (args ):
@@ -51,40 +43,24 @@ def default(args):
5143 "--tests" ,
5244 "--benches" ,
5345 "--" ,
54- * LINT_CONFIG ,
46+ * DENY_WARNINGS ,
5547 )
5648 else :
57- run ("cargo" , "clippy" , "--all-features" , "--tests" , "--" , * LINT_CONFIG )
49+ run ("cargo" , "clippy" , "--all-features" , "--tests" , "--" , * DENY_WARNINGS )
5850
5951 for manifest in gen_examples ("Cargo.toml" ):
60- run ("cargo" , "clippy" , "--manifest-path" , manifest , "--" , * LINT_CONFIG )
52+ run ("cargo" , "clippy" , "--manifest-path" , manifest , "--" , * DENY_WARNINGS )
6153
6254 run ("cargo" , "test" , "--all-features" , "--lib" , "--tests" )
6355
6456
6557def check (args ):
6658 run ("cargo" , "fmt" , "--" , "--check" )
67-
68- run (
69- "cargo" ,
70- "clippy" ,
71- "--all-features" ,
72- "--tests" ,
73- "--" ,
74- * LINT_CONFIG ,
75- )
59+ run ("cargo" , "clippy" , "--all-features" , "--tests" , "--" , * DENY_WARNINGS )
7660
7761 for manifest in gen_examples ("Cargo.toml" ):
7862 run ("cargo" , "fmt" , "--manifest-path" , manifest , "--" , "--check" )
79-
80- run (
81- "cargo" ,
82- "clippy" ,
83- "--manifest-path" ,
84- manifest ,
85- "--" ,
86- * LINT_CONFIG ,
87- )
63+ run ("cargo" , "clippy" , "--manifest-path" , manifest , "--" , * DENY_WARNINGS )
8864
8965
9066def doc (args ):
0 commit comments