Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Merge "Handle blank lines in crate lists" into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Treehugger Robot authored and Gerrit Code Review committed Jan 23, 2025
2 parents 5aaffb2 + d1ebd79 commit 1b076d0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/external_crates/crate_tool/src/pseudo_crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ impl<State: PseudoCrateState> PseudoCrate<State> {
let mut lines = BTreeSet::new();
for line in read(self.path.join(filename)?)?.lines() {
let line = line?;
if line.trim().is_empty() {
continue;
}
if !lines.insert(line.clone()) {
bail!("Duplicate entry {line} in crate list {filename}");
}
Expand Down

0 comments on commit 1b076d0

Please sign in to comment.