Skip to content

Commit d048cbd

Browse files
committed
[assembler] Use Vec::from(OneOrMore<T>) rather than using .collect()
It's less complex and probably more efficient.
1 parent 89aebfc commit d048cbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assembler/src/asmlib/driver/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ fn test_symbol_definition_loop_detection() {
10441044
"expected 2 errors from the assembler, but got {}: {errors:#?}",
10451045
errors.len()
10461046
);
1047-
let errors: Vec<WithLocation<ProgramError>> = errors.into_iter().collect();
1047+
let errors = Vec::from(errors);
10481048
match errors.as_slice() {
10491049
[e1 @ WithLocation {
10501050
location: _,

0 commit comments

Comments
 (0)