Skip to content

Commit 70fb692

Browse files
Use indexing instead of get and unwrap
Co-authored-by: Léo Lanteri Thauvin <leseulartichaut@gmail.com>
1 parent 091df37 commit 70fb692

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/handlers/notify_zulip.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ pub(super) async fn handle_input<'a>(
135135
inputs: Vec<NotifyZulipInput>,
136136
) -> anyhow::Result<()> {
137137
for input in inputs {
138-
let config = config.labels.get(&input.label.name).unwrap();
138+
let config = config.labels[&input.label.name];
139139

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

0 commit comments

Comments
 (0)