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/syn-2.0.119/src/print.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 / syn-2.0.119 / src / print.rs` 16 lines ยท 390 bytes Raw Blame History 1 use proc_macro2::TokenStream; 2 use quote::ToTokens; 3 4 pub(crate) struct TokensOrDefault<'a, T: 'a>(pub &'a Option); 5 6 impl<'a, T> ToTokens for TokensOrDefault<'a, T> 7 where 8 T: ToTokens + Default, 9 { 10 fn to_tokens(&self, tokens: &mut TokenStream) { 11 match self.0 { 12 Some(t) => t.to_tokens(tokens), 13 None => T::default().to_tokens(tokens), 14 } 15 } 16 }