(ch: u32)
| 575 | } |
| 576 | |
| 577 | fn u32_to_char(ch: u32) -> Result<CodePoint, String> { |
| 578 | CodePoint::from_u32(ch) |
| 579 | .ok_or_else(|| format!("character U+{ch:4x} is not in range [U+0000; U+10ffff]")) |
| 580 | } |
| 581 | |
| 582 | impl TryFrom<WideChar> for CodePoint { |
| 583 | type Error = String; |
no test coverage detected