Skip to content

Commit

Permalink
Defense!
Browse files Browse the repository at this point in the history
  • Loading branch information
hlopko committed Jun 23, 2021
1 parent 66fdc90 commit bdb7f54
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rust/private/rust_analyzer.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ def _create_crate(ctx, infos, crate_mapping):
Returns:
(dict) The crate rust-project.json representation
"""
if len(infos) == 0:
fail("Expected to receive at least one crate to serialize to json, got 0.")
canonical_info = infos[0]
crate_name = canonical_info.crate.name
crate = dict()
Expand Down

0 comments on commit bdb7f54

Please sign in to comment.