diff --git a/crates/rome_js_formatter/src/js/lists/template_element_list.rs b/crates/rome_js_formatter/src/js/lists/template_element_list.rs index c9d9fb90d4f..e4453d81797 100644 --- a/crates/rome_js_formatter/src/js/lists/template_element_list.rs +++ b/crates/rome_js_formatter/src/js/lists/template_element_list.rs @@ -145,22 +145,17 @@ impl AnyTemplateElementList { } } -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Default)] pub enum TemplateElementLayout { /// Applied when all expressions are identifiers, `this`, static member expressions, or computed member expressions with number or string literals. /// Formats the expressions on a single line, even if their width otherwise would exceed the print width. SingleLine, /// Tries to format the expression on a single line but may break the expression if the line otherwise exceeds the print width. + #[default] Fit, } -impl Default for TemplateElementLayout { - fn default() -> Self { - TemplateElementLayout::Fit - } -} - declare_node_union! { AnyTemplateElementOrChunk = AnyTemplateElement | AnyTemplateChunkElement }