File tree 2 files changed +19
-1
lines changed
2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,10 @@ readme = "README.md"
10
10
documentation = " http://doc.servo.org/smallvec/"
11
11
12
12
[features ]
13
- heapsizeof = [" heapsize" ]
13
+ heapsizeof = [" heapsize" , " std" ]
14
+ collections = []
15
+ std = []
16
+ default = [" std" ]
14
17
15
18
[lib ]
16
19
name = " smallvec"
Original file line number Diff line number Diff line change 6
6
//! to the heap for larger allocations. This can be a useful optimization for improving cache
7
7
//! locality and reducing allocator traffic for workloads that fit within the inline buffer.
8
8
9
+ #![ cfg_attr( not( feature = "std" ) , no_std) ]
10
+ #![ cfg_attr( not( feature = "std" ) , feature( collections) ) ]
11
+
12
+
13
+ #[ cfg( not( feature = "std" ) ) ]
14
+ extern crate collections;
15
+
16
+ #[ cfg( not( feature = "std" ) ) ]
17
+ use collections:: Vec ;
18
+
9
19
#[ cfg( feature="heapsizeof" ) ]
10
20
extern crate heapsize;
11
21
22
+ #[ cfg( not( feature = "std" ) ) ]
23
+ mod std {
24
+ pub use core:: * ;
25
+ }
26
+
12
27
use std:: borrow:: { Borrow , BorrowMut } ;
13
28
use std:: cmp;
14
29
use std:: fmt;
You can’t perform that action at this time.
0 commit comments