chore(StrToNum): layout is always a Struct, we don't need the Union case

This commit is contained in:
rvcas 2022-01-03 18:15:46 -05:00
parent a85fdda07a
commit d2f95bde63
2 changed files with 2 additions and 4 deletions

View file

@ -5322,7 +5322,6 @@ fn run_low_level<'a, 'ctx, 'env>(
let (string, _string_layout) = load_symbol_and_layout(scope, &args[0]);
let number_layout = match layout {
Layout::Union(UnionLayout::NonRecursive(tags)) => tags[1][0],
Layout::Struct(fields) => fields[0], // TODO: why is it sometimes a struct?
_ => unreachable!(),
};