Skip to content

Commit

Permalink
Confused about my own explanation.
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda committed Feb 6, 2021
1 parent ea0b832 commit fd8b5fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clippy_lints/src/cargo_common_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ 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 = []`)
// only run the lint if publish is `None` (`publish = true` or skipped entirely)
// or if the vector isn't empty (`publish = ["something"]`)
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");
Expand Down

0 comments on commit fd8b5fa

Please sign in to comment.