Skip to content

Commit fd8b5fa

Browse files
committed
Confused about my own explanation.
1 parent ea0b832 commit fd8b5fa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: clippy_lints/src/cargo_common_metadata.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ 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 = []`)
96+
// only run the lint if publish is `None` (`publish = true` or skipped entirely)
97+
// or if the vector isn't empty (`publish = ["something"]`)
9798
if package.publish.as_ref().filter(|publish| publish.is_empty()).is_none() || self.ignore_publish {
9899
if is_empty_vec(&package.authors) {
99100
missing_warning(cx, &package, "package.authors");

0 commit comments

Comments
 (0)