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

Configure Feed

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

remove duplicate empty_list/nil method

author
Giacomo Cavalieri
committer
Louis Pilfold
date (Jul 14, 2026, 12:57 PM +0100) commit 1512b64e parent 9a9a1636 change-id vrouzuqn
+3 -12
+3 -12
erlang-term-format/src/lib.rs
··· 72 72 self.push(byte); 73 73 } 74 74 75 - /// Pushes the etf of an empty list. 76 - /// - If you need to build lists with a number of items that is not known in 77 - /// advance you can use `start_list` and `end_list`. 78 - /// 79 - /// https://www.erlang.org/doc/apps/erts/erl_ext_dist.html#nil_ext 80 - pub fn empty_list(&mut self) { 81 - self.nil() 82 - } 83 - 84 75 /// Start building a list with a number of item that is not known in 85 76 /// advance. 86 77 /// ··· 108 99 } 109 100 110 101 pub fn end_list(&mut self, list: List, items: u32) { 111 - self.nil(); 102 + self.empty_list(); 112 103 self.bytes[list.size_index..list.size_index + 4].copy_from_slice(&items.to_be_bytes()); 113 104 list.consume(); 114 105 } ··· 174 165 } 175 166 176 167 /// https://www.erlang.org/doc/apps/erts/erl_ext_dist.html#nil_ext 177 - fn nil(&mut self) { 168 + pub fn empty_list(&mut self) { 178 169 self.push(106); 179 170 } 180 171 ··· 329 320 #[test] 330 321 fn empty_list() { 331 322 let mut etf = Etf::new(); 332 - etf.nil(); 323 + etf.empty_list(); 333 324 assert_eq!(etf.into_vec(), [131, 106]); 334 325 } 335 326