1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-10 15:04:32 +03:00

add error handling to getting best match

refs: #383
This commit is contained in:
Wez Furlong 2020-12-19 09:23:05 -08:00
parent dc83c6de2a
commit ad7362d3f7

View File

@ -329,7 +329,11 @@ impl Pattern {
if !best.is_null() {
add_object();
}
Ok(Pattern { pat: best })
if !res.succeeded() {
Err(res.as_err())
} else {
Ok(Pattern { pat: best })
}
}
}