Skip to content

Commit ea0b832

Browse files
committed
Document condition.
1 parent 3c8f754 commit ea0b832

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: clippy_lints/src/cargo_common_metadata.rs

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ impl LateLintPass<'_> for CargoCommonMetadata {
9393
let metadata = unwrap_cargo_metadata!(cx, CARGO_COMMON_METADATA, false);
9494

9595
for package in metadata.packages {
96+
// we want to skip the lint if publish is `None` (`publish = false`) or if the vector is empty (`publish = []`)
9697
if package.publish.as_ref().filter(|publish| publish.is_empty()).is_none() || self.ignore_publish {
9798
if is_empty_vec(&package.authors) {
9899
missing_warning(cx, &package, "package.authors");

0 commit comments

Comments
 (0)