Skip to content

Commit

Permalink
Use indexing instead of get and unwrap
Browse files Browse the repository at this point in the history
Co-authored-by: Léo Lanteri Thauvin <leseulartichaut@gmail.com>
  • Loading branch information
camelid and LeSeulArtichaut authored Mar 14, 2021
1 parent 091df37 commit 70fb692
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/handlers/notify_zulip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ pub(super) async fn handle_input<'a>(
inputs: Vec<NotifyZulipInput>,
) -> anyhow::Result<()> {
for input in inputs {
let config = config.labels.get(&input.label.name).unwrap();
let config = config.labels[&input.label.name];

let mut topic = config.topic.clone();
topic = topic.replace("{number}", &event.issue.number.to_string());
Expand Down

0 comments on commit 70fb692

Please sign in to comment.