File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,10 @@ readme = "README.md"
1010documentation = " http://doc.servo.org/smallvec/"
1111
1212[features ]
13- heapsizeof = [" heapsize" ]
13+ heapsizeof = [" heapsize" , " std" ]
14+ collections = []
15+ std = []
16+ default = [" std" ]
1417
1518[lib ]
1619name = " smallvec"
Original file line number Diff line number Diff line change 66//! to the heap for larger allocations. This can be a useful optimization for improving cache
77//! locality and reducing allocator traffic for workloads that fit within the inline buffer.
88
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+
919#[ cfg( feature="heapsizeof" ) ]
1020extern crate heapsize;
1121
22+ #[ cfg( not( feature = "std" ) ) ]
23+ mod std {
24+ pub use core:: * ;
25+ }
26+
1227use std:: borrow:: { Borrow , BorrowMut } ;
1328use std:: cmp;
1429use std:: fmt;
You can’t perform that action at this time.
0 commit comments