Skip to content

Commit

Permalink
Add no_std Support
Browse files Browse the repository at this point in the history
  • Loading branch information
leesum1 committed Jun 28, 2023
1 parent 9cd8c09 commit 8b77a0a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#![no_std]
extern crate alloc;

pub mod linked_hash_map;
pub mod linked_hash_set;
pub mod lru_cache;
Expand Down
3 changes: 2 additions & 1 deletion src/linked_hash_map.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{
use core::{
alloc::Layout,
borrow::Borrow,
cmp::Ordering,
Expand All @@ -11,6 +11,7 @@ use std::{
ptr::{self, NonNull},
};

use alloc::boxed::Box;
use hashbrown::{hash_map, HashMap};

pub enum TryReserveError {
Expand Down
2 changes: 1 addition & 1 deletion src/linked_hash_set.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{
use core::{
borrow::Borrow,
fmt,
hash::{BuildHasher, Hash, Hasher},
Expand Down
2 changes: 1 addition & 1 deletion src/lru_cache.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{
use core::{
borrow::Borrow,
fmt,
hash::{BuildHasher, Hash},
Expand Down
2 changes: 1 addition & 1 deletion src/serde.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{
use core::{
fmt::{self, Formatter},
hash::{BuildHasher, Hash},
marker::PhantomData,
Expand Down

0 comments on commit 8b77a0a

Please sign in to comment.