File tree 3 files changed +15
-10
lines changed
3 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,12 @@ dependencies = [
94
94
" nodrop" ,
95
95
]
96
96
97
+ [[package ]]
98
+ name = " arrayvec"
99
+ version = " 0.5.1"
100
+ source = " registry+https://github.com/rust-lang/crates.io-index"
101
+ checksum = " cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8"
102
+
97
103
[[package ]]
98
104
name = " atty"
99
105
version = " 0.2.14"
@@ -164,7 +170,7 @@ version = "0.2.18"
164
170
source = " registry+https://github.com/rust-lang/crates.io-index"
165
171
checksum = " 5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400"
166
172
dependencies = [
167
- " arrayvec" ,
173
+ " arrayvec 0.4.7 " ,
168
174
" constant_time_eq" ,
169
175
]
170
176
@@ -714,7 +720,7 @@ version = "0.7.2"
714
720
source = " registry+https://github.com/rust-lang/crates.io-index"
715
721
checksum = " fedcd6772e37f3da2a9af9bf12ebe046c0dfe657992377b4df982a2b54cd37a9"
716
722
dependencies = [
717
- " arrayvec" ,
723
+ " arrayvec 0.4.7 " ,
718
724
" cfg-if" ,
719
725
" crossbeam-utils 0.6.5" ,
720
726
" lazy_static" ,
@@ -3494,8 +3500,8 @@ dependencies = [
3494
3500
name = " rustc_index"
3495
3501
version = " 0.0.0"
3496
3502
dependencies = [
3503
+ " arrayvec 0.5.1" ,
3497
3504
" rustc_serialize" ,
3498
- " smallvec 1.4.0" ,
3499
3505
]
3500
3506
3501
3507
[[package ]]
Original file line number Diff line number Diff line change @@ -11,4 +11,4 @@ doctest = false
11
11
12
12
[dependencies ]
13
13
rustc_serialize = { path = " ../librustc_serialize" }
14
- smallvec = { version = " 1.0 " , features = [ " union " , " may_dangle " ] }
14
+ arrayvec = " 0.5.1 "
Original file line number Diff line number Diff line change 1
1
use crate :: vec:: { Idx , IndexVec } ;
2
- use smallvec :: SmallVec ;
2
+ use arrayvec :: ArrayVec ;
3
3
use std:: fmt;
4
4
use std:: iter;
5
5
use std:: marker:: PhantomData ;
@@ -355,20 +355,19 @@ where
355
355
const SPARSE_MAX : usize = 8 ;
356
356
357
357
/// A fixed-size bitset type with a sparse representation and a maximum of
358
- /// `SPARSE_MAX` elements. The elements are stored as a sorted `SmallVec` with
359
- /// no duplicates; although `SmallVec` can spill its elements to the heap, that
360
- /// never happens within this type because of the `SPARSE_MAX` limit.
358
+ /// `SPARSE_MAX` elements. The elements are stored as a sorted `ArrayVec` with
359
+ /// no duplicates.
361
360
///
362
361
/// This type is used by `HybridBitSet`; do not use directly.
363
362
#[ derive( Clone , Debug ) ]
364
363
pub struct SparseBitSet < T : Idx > {
365
364
domain_size : usize ,
366
- elems : SmallVec < [ T ; SPARSE_MAX ] > ,
365
+ elems : ArrayVec < [ T ; SPARSE_MAX ] > ,
367
366
}
368
367
369
368
impl < T : Idx > SparseBitSet < T > {
370
369
fn new_empty ( domain_size : usize ) -> Self {
371
- SparseBitSet { domain_size, elems : SmallVec :: new ( ) }
370
+ SparseBitSet { domain_size, elems : ArrayVec :: new ( ) }
372
371
}
373
372
374
373
fn len ( & self ) -> usize {
You can’t perform that action at this time.
0 commit comments