mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
Finish implementing is_multiline for Spaced
This commit is contained in:
parent
3b1ca5c310
commit
271112fec1
1 changed files with 8 additions and 2 deletions
|
@ -222,8 +222,14 @@ fn fmt_package_name<'buf>(buf: &mut Buf<'buf>, name: PackageName, _indent: u16)
|
|||
|
||||
impl<'a, T: Formattable> Formattable for Spaced<'a, T> {
|
||||
fn is_multiline(&self) -> bool {
|
||||
// TODO
|
||||
false
|
||||
use Spaced::*;
|
||||
|
||||
match self {
|
||||
Item(formattable) => formattable.is_multiline(),
|
||||
SpaceBefore(formattable, spaces) | SpaceAfter(formattable, spaces) => {
|
||||
!spaces.is_empty() || formattable.is_multiline()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn format_with_options<'buf>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue