token
was matched with a wildcard, consider using ..
instead 35 return Err((StatusCode::UNAUTHORIZED, "Invalid token"));
36 };
37
38 let scripty_config::BotListsConfig::FullConfig { token: _, webhook } = webhook_config 39 else {
40 warn!("couldn't find valid configuration for top.gg (got single key, need double)");
41 return Err((StatusCode::UNAUTHORIZED, "Invalid token"));
token
was matched with a wildcard, consider using ..
instead 36 return Err((StatusCode::UNAUTHORIZED, "Invalid token"));
37 };
38
39 let scripty_config::BotListsConfig::FullConfig { token: _, webhook } = webhook_config 40 else {
41 warn!(
42 "couldn't find valid configuration for wumpus.store (got single key, need double)"
token
was matched with a wildcard, consider using ..
instead 38 return Err((StatusCode::UNAUTHORIZED, "Invalid token"));
39 };
40
41 let scripty_config::BotListsConfig::FullConfig { token: _, webhook } = webhook_config 42 else {
43 warn!(
44 "couldn't find valid configuration for discordservices.net (got single key, need \
This checker looks for struct field patterns bound to wildcards. Prefer ..
instead, as it is shorter and directs focus towards fields that are actually bound.
Replace occurrences of wildcard field patterns with the rest operator, ..
.
match s {
S { a: 0, b: _, c: _ } => (),
S { a: _, b: _, c: _, .. } => (),
}
match s {
S { a: 0, .. } => (),
S { .. } => (),
}