Skip to content

Commit e75d8f2

Browse files
authored
Merge pull request #16 from stabler/master
Make library no_std compatible
2 parents 631a235 + 8db3985 commit e75d8f2

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/lib.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,17 @@
6767
//! output.push_str("world!");
6868
//! ```
6969
70+
#![cfg_attr(not(test), no_std)]
7071
#![deny(missing_debug_implementations, missing_docs)]
7172

73+
extern crate alloc;
74+
7275
use cache_padded::CachePadded;
7376

74-
use std::{
77+
use alloc::sync::Arc;
78+
use core::{
7579
cell::UnsafeCell,
76-
sync::{
77-
atomic::{AtomicU8, Ordering},
78-
Arc,
79-
},
80+
sync::atomic::{AtomicU8, Ordering},
8081
};
8182

8283
/// A triple buffer, useful for nonblocking and thread-safe data sharing

0 commit comments

Comments
 (0)