| 130 | |
| 131 | impl Display for Promotion { |
| 132 | fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { |
| 133 | match self { |
| 134 | Self::Direct => write!(formatter, "Direct"), |
| 135 | Self::IntToLong => write!(formatter, "Int->Long"), |
| 136 | Self::IntToFloat => write!(formatter, "Int->Float"), |
| 137 | Self::IntToDouble => write!(formatter, "Int->Double"), |
| 138 | Self::LongToFloat => write!(formatter, "Long->Float"), |
| 139 | Self::LongToDouble => write!(formatter, "Long->Double"), |
| 140 | Self::FloatToDouble => write!(formatter, "Float->Double"), |
| 141 | Self::StringToBytes => write!(formatter, "String->Bytes"), |
| 142 | Self::BytesToString => write!(formatter, "Bytes->String"), |
| 143 | } |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | /// Information required to resolve a writer union against a reader union (or single type). |