Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
Fix clippy::derivable_impls in rome_js_formatter::js::lists::template…
Browse files Browse the repository at this point in the history
…_element_list

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
  • Loading branch information
andersk committed Feb 25, 2023
1 parent 9483195 commit b4985a6
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit b4985a6

Please sign in to comment.