File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -68,15 +68,15 @@ fn check_spam_attack(conn: &PgConnection) -> CargoResult<()> {
68
68
println ! ( "Checking for crates indicating someone is spamming us" ) ;
69
69
70
70
let bad_crate_names = dotenv:: var ( "SPAM_CRATE_NAMES" ) ;
71
- let bad_crate_names = bad_crate_names
71
+ let bad_crate_names: Vec < _ > = bad_crate_names
72
72
. as_ref ( )
73
- . map ( |s| s. split ( "," ) . collect ( ) )
74
- . unwrap_or ( Vec :: new ( ) ) ;
73
+ . map ( |s| s. split ( ',' ) . collect ( ) )
74
+ . unwrap_or_default ( ) ;
75
75
let bad_author_patterns = dotenv:: var ( "SPAM_AUTHOR_PATTERNS" ) ;
76
- let bad_author_patterns = bad_author_patterns
76
+ let bad_author_patterns: Vec < _ > = bad_author_patterns
77
77
. as_ref ( )
78
- . map ( |s| s. split ( "," ) . collect ( ) )
79
- . unwrap_or ( Vec :: new ( ) ) ;
78
+ . map ( |s| s. split ( ',' ) . collect ( ) )
79
+ . unwrap_or_default ( ) ;
80
80
81
81
let mut event_description = None ;
82
82
You can’t perform that action at this time.
0 commit comments