mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-12 06:53:05 +00:00
Document condition.
This commit is contained in:
parent
3c8f7542f7
commit
ea0b8324d6
@ -93,6 +93,7 @@ impl LateLintPass<'_> for CargoCommonMetadata {
|
||||
let metadata = unwrap_cargo_metadata!(cx, CARGO_COMMON_METADATA, false);
|
||||
|
||||
for package in metadata.packages {
|
||||
// we want to skip the lint if publish is `None` (`publish = false`) or if the vector is empty (`publish = []`)
|
||||
if package.publish.as_ref().filter(|publish| publish.is_empty()).is_none() || self.ignore_publish {
|
||||
if is_empty_vec(&package.authors) {
|
||||
missing_warning(cx, &package, "package.authors");
|
||||
|
Loading…
Reference in New Issue
Block a user