(c: CodePoint)
| 54 | |
| 55 | impl FormatConversion { |
| 56 | pub fn from_char(c: CodePoint) -> Option<Self> { |
| 57 | match c.to_char_lossy() { |
| 58 | 's' => Some(Self::Str), |
| 59 | 'r' => Some(Self::Repr), |
| 60 | 'a' => Some(Self::Ascii), |
| 61 | 'b' => Some(Self::Bytes), |
| 62 | _ => None, |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | fn from_string(text: &Wtf8) -> Option<Self> { |
| 67 | let mut chars = text.code_points(); |
nothing calls this directly
no test coverage detected