Skip to main content

decls_as_stmts

Function decls_as_stmts 

Source
pub fn decls_as_stmts(decls: Vec<TsDecl>) -> Vec<TsStmt>
Expand description

Collects decls into real statements — the shared shape every caller of emit_helpers_for_owner/emit_generic_helpers (and their _qualified twins) collects into its own returned Vec<TsStmt>. Arc F slice 1 (#1451): consolidates what used to be ten separate write!-family call sites into this one; #1478 made it the one real implementation (dropping a hand-duplicated out: &mut String-printing sibling); #1479 removed that sibling’s own last two production callers (project/ tests_emit.rs’s codec-helper glue), so every caller in the crate is on this Vec<TsStmt> form directly now. #1486: no more explicit blank TsStmt after each declaration — none of these are import/comment-kind, so the printer’s automatic top-level spacing policy already supplies exactly one blank between every adjacent pair (and after the last one, before whatever follows) once a real caller prints through it.