mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Trim opts
This commit is contained in:
parent
2f43aad8d0
commit
25f58a74cc
1 changed files with 2 additions and 2 deletions
|
@ -136,7 +136,7 @@ impl TestCase {
|
||||||
let found_infer_opts = RE_OPT_INFER.captures_iter(data);
|
let found_infer_opts = RE_OPT_INFER.captures_iter(data);
|
||||||
for infer_opt in found_infer_opts {
|
for infer_opt in found_infer_opts {
|
||||||
let opt = infer_opt.name("opt").unwrap().as_str();
|
let opt = infer_opt.name("opt").unwrap().as_str();
|
||||||
match opt {
|
match opt.trim() {
|
||||||
"allow_errors" => infer_opts.allow_errors = true,
|
"allow_errors" => infer_opts.allow_errors = true,
|
||||||
"print_only_under_alias" => infer_opts.print_only_under_alias = true,
|
"print_only_under_alias" => infer_opts.print_only_under_alias = true,
|
||||||
other => return Err(format!("unknown infer option: {other}").into()),
|
other => return Err(format!("unknown infer option: {other}").into()),
|
||||||
|
@ -152,7 +152,7 @@ impl TestCase {
|
||||||
let found_infer_opts = RE_OPT_PRINT.captures_iter(data);
|
let found_infer_opts = RE_OPT_PRINT.captures_iter(data);
|
||||||
for infer_opt in found_infer_opts {
|
for infer_opt in found_infer_opts {
|
||||||
let opt = infer_opt.name("opt").unwrap().as_str();
|
let opt = infer_opt.name("opt").unwrap().as_str();
|
||||||
match opt {
|
match opt.trim() {
|
||||||
"can_decls" => print_opts.can_decls = true,
|
"can_decls" => print_opts.can_decls = true,
|
||||||
other => return Err(format!("unknown print option: {other}").into()),
|
other => return Err(format!("unknown print option: {other}").into()),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue