Return this union as a character class set item. If this union contains zero items, then an empty union is returned. If this concatenation contains exactly 1 item, then the corresponding item is returned. Otherwise, ClassSetItem::Union is returned.
(mut self)
| 1058 | /// corresponding item is returned. Otherwise, ClassSetItem::Union is |
| 1059 | /// returned. |
| 1060 | pub fn into_item(mut self) -> ClassSetItem { |
| 1061 | match self.items.len() { |
| 1062 | 0 => ClassSetItem::Empty(self.span), |
| 1063 | 1 => self.items.pop().unwrap(), |
| 1064 | _ => ClassSetItem::Union(self), |
| 1065 | } |
| 1066 | } |
| 1067 | } |
| 1068 | |
| 1069 | /// A Unicode character class set operation. |
no test coverage detected