hangman_solver 0.6.0

Solves hangman puzzles
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// SPDX-License-Identifier: EUPL-1.2

pub trait CharUtils {
    fn to_ascii_char(self) -> Option<u8>;
}

impl CharUtils for char {
    #[inline]
    fn to_ascii_char(self) -> Option<u8> {
        if self.is_ascii() {
            Some(self as u8)
        } else {
            None
        }
    }
}