Skip to content

Commit

Permalink
make macro no_std
Browse files Browse the repository at this point in the history
  • Loading branch information
vic1707 committed Sep 12, 2024
1 parent 09c0c19 commit aaf0245
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/attributes.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/* Crate imports */
use crate::compile_error::CompileError;
/* Built-in imports */
extern crate alloc;
use alloc::{format, vec, vec::Vec};
/* Dependencies */
use quote::quote;
use syn::{Expr, Lit, Type};
Expand Down
3 changes: 1 addition & 2 deletions src/compile_error.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* Built-in imports */
use core::fmt;
use std::error;
use core::{error, fmt};

#[derive(Debug)]
#[repr(transparent)]
Expand Down
3 changes: 3 additions & 0 deletions src/deserialize_impl.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/* Crate imports */
use crate::compile_error::CompileError;
use quote::ToTokens;
/* Built-in imports */
extern crate alloc;
use alloc::vec::Vec;
/* Dependencies */
use serde_derive_implementation::de::expand_derive_deserialize;
use syn::{Expr, ImplItem, ImplItemFn, Item, ItemConst, Stmt};
Expand Down
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![no_std]
/* Modules */
mod attributes;
mod compile_error;
Expand All @@ -7,6 +8,9 @@ mod utils;
use attributes::Attributes;
use deserialize_impl::DeserializeImpl;
use utils::tri;
/* Built-in imports */
extern crate alloc;
use alloc::{format, string::ToString};
/* Dependencies */
use quote::quote;
use syn::Data;
Expand Down

0 comments on commit aaf0245

Please sign in to comment.