Skip to content

Commit 01b9f05

Browse files
authored
Change arc/cow/cstring requirements from std to alloc (sharksforarms#579)
1 parent e29a96b commit 01b9f05

4 files changed

Lines changed: 9 additions & 8 deletions

File tree

src/impls/arc.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
use no_std_io::io::{Read, Seek, Write};
2-
use std::sync::Arc;
3-
1+
use alloc::sync::Arc;
42
use alloc::vec::Vec;
3+
use no_std_io::io::{Read, Seek, Write};
54

65
use crate::ctx::Limit;
76
use crate::reader::Reader;

src/impls/cow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::borrow::{Borrow, Cow};
1+
use alloc::borrow::{Borrow, Cow};
22

33
use no_std_io::io::{Read, Seek, Write};
44

src/impls/cstring.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
use alloc::borrow::Cow;
2+
use alloc::ffi::CString;
3+
use alloc::format;
4+
use alloc::vec::Vec;
25
use no_std_io::io::{Read, Seek, Write};
3-
use std::ffi::CString;
46

57
use crate::reader::Reader;
68
use crate::writer::Writer;

src/impls/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ mod tuple;
88
mod unit;
99
mod vec;
1010

11-
#[cfg(feature = "std")]
11+
#[cfg(feature = "alloc")]
1212
mod arc;
1313

14-
#[cfg(feature = "std")]
14+
#[cfg(feature = "alloc")]
1515
mod cow;
1616

17-
#[cfg(feature = "std")]
17+
#[cfg(feature = "alloc")]
1818
mod cstring;
1919

2020
#[cfg(feature = "std")]

0 commit comments

Comments
 (0)