mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-16 10:10:52 +00:00
give 2 space indentations to each enum variant
This commit is contained in:
parent
a1995cafd4
commit
6e2f10440e
@ -2573,12 +2573,12 @@ impl<'a, 'b> SubContext<'a, 'b> {
|
||||
.typescript
|
||||
.push_str(&format!("export enum {} {{", enum_.name));
|
||||
|
||||
variants.clear();
|
||||
for variant in enum_.variants.iter() {
|
||||
variants.push_str(&format!("{},", variant.name));
|
||||
self.cx
|
||||
.typescript
|
||||
.push_str(&format!("\n {},", variant.name));
|
||||
}
|
||||
self.cx.typescript.push_str(&variants);
|
||||
self.cx.typescript.push_str("}\n");
|
||||
self.cx.typescript.push_str("\n}\n");
|
||||
}
|
||||
|
||||
fn generate_struct(&mut self, struct_: &decode::Struct) -> Result<(), Error> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user