Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/vendor/proc-macro2/src/num.rs # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / vendor / proc-macro2 / src / num.rs` 17 lines ยท 342 bytes Raw Blame History 1 // TODO: use NonZero in Rust 1.89+ 2 #[derive(Copy, Clone, Debug, PartialEq, Eq)] 3 pub struct NonZeroChar(char); 4 5 impl NonZeroChar { 6 pub fn new(ch: char) -> Option { 7 if ch == '\0' { 8 None 9 } else { 10 Some(NonZeroChar(ch)) 11 } 12 } 13 14 pub fn get(self) -> char { 15 self.0 16 } 17 }