Fork of daniellemaywood.uk/gleam — Wasm codegen work
2

Configure Feed

Select the types of activity you want to include in your feed.

fix failing tests

author
Giacomo Cavalieri
committer
Louis Pilfold
date (Jun 15, 2026, 12:37 PM +0100) commit f95e57e3 parent ae1e53f4 change-id wkozkxnt
+10 -6
+10 -6
compiler-core/src/format.rs
··· 107 107 open_bit_array: Document<'doc, 'a>, 108 108 right_arrow: Document<'doc, 'a>, 109 109 pub_space: Document<'doc, 'a>, 110 - value: Document<'doc, 'a>, 111 110 size: Document<'doc, 'a>, 112 111 bytes: Document<'doc, 'a>, 113 112 bits: Document<'doc, 'a>, ··· 152 151 external_javascript_quote: Document<'doc, 'a>, 153 152 quote_comma_space_quote: Document<'doc, 'a>, 154 153 internal_attribute: Document<'doc, 'a>, 154 + unit: Document<'doc, 'a>, 155 155 } 156 156 157 157 impl<'doc, 'a> FormatterCache<'doc, 'a> { ··· 235 235 open_bit_array: "<<".to_doc(arena), 236 236 right_arrow: "->".to_doc(arena), 237 237 pub_space: "pub ".to_doc(arena), 238 - value: "value".to_doc(arena), 239 238 size: "size".to_doc(arena), 240 239 bytes: "bytes".to_doc(arena), 241 240 bits: "bits".to_doc(arena), ··· 252 251 big: "big".to_doc(arena), 253 252 little: "little".to_doc(arena), 254 253 native: "native".to_doc(arena), 254 + unit: "unit".to_doc(arena), 255 255 and: "&&".to_doc(arena), 256 256 or: "||".to_doc(arena), 257 257 lt_int: "<".to_doc(arena), ··· 941 941 ItemsPacking::FitOnePerLine | ItemsPacking::BreakOnePerLine => cache.comma_break, 942 942 }; 943 943 944 + let mut is_empty = true; 944 945 let mut elements_doc = cache.nil; 945 946 for element in elements.iter() { 946 947 let empty_lines = self.pop_empty_lines(element.location().start); 947 948 let element_doc = self.const_expr(arena, cache, element); 948 949 949 - elements_doc = if elements_doc.is_empty() { 950 + elements_doc = if is_empty { 951 + is_empty = false; 950 952 element_doc 951 953 } else if empty_lines { 952 954 // If there's empty lines before the list item we want to add an ··· 3002 3004 None => 0, 3003 3005 }; 3004 3006 3007 + let mut is_empty = true; 3005 3008 let mut elements_doc = cache.nil; 3006 - for element in elements.iter() { 3009 + for element in elements { 3007 3010 let empty_lines = self.pop_empty_lines(element.location().start); 3008 3011 let element_doc = self.comma_separated_item(arena, cache, element, list_size); 3009 3012 3010 - elements_doc = if elements_doc.is_empty() { 3013 + elements_doc = if is_empty { 3014 + is_empty = false; 3011 3015 element_doc 3012 3016 } else if empty_lines { 3013 3017 // If there's empty lines before the list item we want to add an ··· 4781 4785 } => to_doc(value), 4782 4786 4783 4787 BitArrayOption::Unit { value, .. } => cache 4784 - .value 4788 + .unit 4785 4789 .append(arena, cache.open_paren) 4786 4790 .append(arena, eco_format!("{value}")) 4787 4791 .append(arena, cache.close_paren),