format code & replace vec!(in arena;...) with arena.alloc([...])

This commit is contained in:
HajagosNorbert 2023-11-21 11:09:42 +01:00
parent 9c21ac1388
commit 6975294278
No known key found for this signature in database
GPG key ID: 807F4444870DB673
4 changed files with 22 additions and 14 deletions

View file

@ -2153,19 +2153,14 @@ impl<'a> Expr<'a> {
.append(symbol_to_doc(alloc, *structure, pretty)),
GetElementPointer {
structure,
indices,
..
structure, indices, ..
} => {
let it = indices.iter().map(|num| alloc.as_string(num));
let it = alloc.intersperse(it, ", ");
text!(
alloc,
"GetElementPointer (Indices [",
)
.append(it)
.append(alloc.text("]) "))
.append(symbol_to_doc(alloc, *structure, pretty))
text!(alloc, "GetElementPointer (Indices [",)
.append(it)
.append(alloc.text("]) "))
.append(symbol_to_doc(alloc, *structure, pretty))
}
// .append(alloc.intersperse(index.iter(), ", "))},
Alloca { initializer, .. } => match initializer {