From e2c681b511994602e8d2e65962b0c7ca9e14cb95 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 7 Feb 2024 04:03:47 -0800 Subject: [PATCH] convert to tabs --- src/lib.rs | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 5c67530..7869c89 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,25 +6,25 @@ use syn::{parse_macro_input, DeriveInput}; #[proc_macro_derive(Id)] pub fn id_derive(input: TokenStream) -> TokenStream { - // Parse the input tokens into a syntax tree - let ast = parse_macro_input!(input as DeriveInput); - let name = &ast.ident; + // Parse the input tokens into a syntax tree + let ast = parse_macro_input!(input as DeriveInput); + let name = &ast.ident; - // Generate the code for the implementation - let expanded = quote! { - impl #name { - #[inline] - pub const fn new(id: u32) -> Self { - Self(id) - } + // Generate the code for the implementation + let expanded = quote! { + impl #name { + #[inline] + pub const fn new(id: u32) -> Self { + Self(id) + } - #[inline] - pub const fn get(self) -> u32 { - self.0 - } - } - }; + #[inline] + pub const fn get(self) -> u32 { + self.0 + } + } + }; - // Convert the generated code into a token stream and return it - TokenStream::from(expanded) + // Convert the generated code into a token stream and return it + TokenStream::from(expanded) }