File tree 12 files changed +54
-56
lines changed
12 files changed +54
-56
lines changed Original file line number Diff line number Diff line change @@ -29,14 +29,12 @@ name = "benchmark"
29
29
harness = false
30
30
31
31
[features ]
32
- default = []
32
+ default = [" hashbrown/nightly " ]
33
33
# use `cargo bench --features sbench` only if you want benchmarks with 10 million
34
34
# iterations (may fail on some systems)
35
35
sbench = []
36
36
37
- # nightly feature for `no_std`
38
- # for build use `cargo +nightly build --features no_std`
39
- no_std = [" hashbrown/nightly" ]
37
+ std = []
40
38
41
39
[package .metadata .docs .rs ]
42
40
features = [" dot" ]
Original file line number Diff line number Diff line change 1
1
use crate :: { Graph , GraphErr , VertexId } ;
2
2
3
- #[ cfg( feature = "no_std" ) ]
3
+ #[ cfg( not ( feature = "std" ) ) ]
4
4
use core:: io:: Write ;
5
5
6
- #[ cfg( not ( feature = "no_std" ) ) ]
6
+ #[ cfg( feature = "std" ) ]
7
7
use std:: io:: Write ;
8
8
9
- #[ cfg( feature = "no_std" ) ]
9
+ #[ cfg( not ( feature = "std" ) ) ]
10
10
use core:: borrow:: Cow ;
11
11
12
- #[ cfg( not ( feature = "no_std" ) ) ]
12
+ #[ cfg( feature = "std" ) ]
13
13
use std:: borrow:: Cow ;
14
14
15
- #[ cfg( feature = "no_std" ) ]
15
+ #[ cfg( not ( feature = "std" ) ) ]
16
16
use core:: fmt:: Debug ;
17
17
18
- #[ cfg( not ( feature = "no_std" ) ) ]
18
+ #[ cfg( feature = "std" ) ]
19
19
use std:: fmt:: Debug ;
20
20
21
21
type Nd = VertexId ;
Original file line number Diff line number Diff line change 1
1
// Copyright 2019 Octavian Oncescu
2
2
3
3
use crate :: vertex_id:: VertexId ;
4
- #[ cfg( not ( feature = "no_std" ) ) ]
4
+ #[ cfg( feature = "std" ) ]
5
5
use std:: hash:: Hash ;
6
- #[ cfg( not ( feature = "no_std" ) ) ]
6
+ #[ cfg( feature = "std" ) ]
7
7
use std:: hash:: Hasher ;
8
8
9
- #[ cfg( feature = "no_std" ) ]
9
+ #[ cfg( not ( feature = "std" ) ) ]
10
10
extern crate alloc;
11
- #[ cfg( feature = "no_std" ) ]
11
+ #[ cfg( not ( feature = "std" ) ) ]
12
12
use core:: hash:: { Hash , Hasher } ;
13
13
14
14
#[ derive( Clone , Debug ) ]
Original file line number Diff line number Diff line change @@ -5,23 +5,23 @@ use crate::iterators::*;
5
5
use crate :: vertex_id:: VertexId ;
6
6
use hashbrown:: { HashMap , HashSet } ;
7
7
8
- #[ cfg( feature = "no_std" ) ]
8
+ #[ cfg( not ( feature = "std" ) ) ]
9
9
use core:: iter;
10
- #[ cfg( not ( feature = "no_std" ) ) ]
10
+ #[ cfg( feature = "std" ) ]
11
11
use std:: iter;
12
12
13
- #[ cfg( feature = "no_std" ) ]
13
+ #[ cfg( not ( feature = "std" ) ) ]
14
14
use core:: fmt:: Debug ;
15
- #[ cfg( not ( feature = "no_std" ) ) ]
15
+ #[ cfg( feature = "std" ) ]
16
16
use std:: fmt:: Debug ;
17
17
18
- #[ cfg( feature = "no_std" ) ]
18
+ #[ cfg( not ( feature = "std" ) ) ]
19
19
extern crate alloc;
20
- #[ cfg( feature = "no_std" ) ]
20
+ #[ cfg( not ( feature = "std" ) ) ]
21
21
use alloc:: boxed:: Box ;
22
- #[ cfg( feature = "no_std" ) ]
22
+ #[ cfg( not ( feature = "std" ) ) ]
23
23
use alloc:: vec;
24
- #[ cfg( feature = "no_std" ) ]
24
+ #[ cfg( not ( feature = "std" ) ) ]
25
25
use alloc:: vec:: Vec ;
26
26
27
27
#[ cfg( feature = "dot" ) ]
Original file line number Diff line number Diff line change @@ -4,21 +4,21 @@ use crate::graph::Graph;
4
4
use crate :: vertex_id:: VertexId ;
5
5
6
6
use hashbrown:: HashSet ;
7
- #[ cfg( not ( feature = "no_std" ) ) ]
7
+ #[ cfg( feature = "std" ) ]
8
8
use std:: collections:: VecDeque ;
9
9
10
- #[ cfg( feature = "no_std" ) ]
10
+ #[ cfg( not ( feature = "std" ) ) ]
11
11
extern crate alloc;
12
- #[ cfg( feature = "no_std" ) ]
12
+ #[ cfg( not ( feature = "std" ) ) ]
13
13
use alloc:: collections:: vec_deque:: VecDeque ;
14
14
15
- #[ cfg( feature = "no_std" ) ]
15
+ #[ cfg( not ( feature = "std" ) ) ]
16
16
use alloc:: vec:: Vec ;
17
17
18
- #[ cfg( feature = "no_std" ) ]
18
+ #[ cfg( not ( feature = "std" ) ) ]
19
19
use core:: fmt:: Debug ;
20
20
21
- #[ cfg( not ( feature = "no_std" ) ) ]
21
+ #[ cfg( feature = "std" ) ]
22
22
use std:: fmt:: Debug ;
23
23
24
24
#[ derive( Debug ) ]
Original file line number Diff line number Diff line change @@ -4,21 +4,21 @@ use crate::graph::Graph;
4
4
use crate :: iterators:: VertexIter ;
5
5
use crate :: vertex_id:: VertexId ;
6
6
7
- #[ cfg( feature = "no_std" ) ]
7
+ #[ cfg( not ( feature = "std" ) ) ]
8
8
use core:: iter:: { Chain , Cloned , Peekable } ;
9
9
use hashbrown:: HashSet ;
10
- #[ cfg( not ( feature = "no_std" ) ) ]
10
+ #[ cfg( feature = "std" ) ]
11
11
use std:: iter:: { Chain , Cloned , Peekable } ;
12
12
13
- #[ cfg( feature = "no_std" ) ]
13
+ #[ cfg( not ( feature = "std" ) ) ]
14
14
extern crate alloc;
15
- #[ cfg( feature = "no_std" ) ]
15
+ #[ cfg( not ( feature = "std" ) ) ]
16
16
use alloc:: vec:: Vec ;
17
17
18
- #[ cfg( feature = "no_std" ) ]
18
+ #[ cfg( not ( feature = "std" ) ) ]
19
19
use core:: fmt:: Debug ;
20
20
21
- #[ cfg( not ( feature = "no_std" ) ) ]
21
+ #[ cfg( feature = "std" ) ]
22
22
use std:: fmt:: Debug ;
23
23
24
24
#[ derive( Debug ) ]
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use crate::vertex_id::VertexId;
8
8
use hashbrown:: HashMap ;
9
9
use hashbrown:: HashSet ;
10
10
11
- #[ cfg( not ( feature = "no_std" ) ) ]
11
+ #[ cfg( feature = "std" ) ]
12
12
use std:: {
13
13
cmp:: Ordering ,
14
14
collections:: { BinaryHeap , VecDeque } ,
@@ -17,14 +17,14 @@ use std::{
17
17
iter,
18
18
} ;
19
19
20
- #[ cfg( feature = "no_std" ) ]
20
+ #[ cfg( not ( feature = "std" ) ) ]
21
21
extern crate alloc;
22
- #[ cfg( feature = "no_std" ) ]
22
+ #[ cfg( not ( feature = "std" ) ) ]
23
23
use alloc:: boxed:: Box ;
24
- #[ cfg( feature = "no_std" ) ]
24
+ #[ cfg( not ( feature = "std" ) ) ]
25
25
use alloc:: collections:: { binary_heap:: BinaryHeap , vec_deque:: VecDeque } ;
26
26
27
- #[ cfg( feature = "no_std" ) ]
27
+ #[ cfg( not ( feature = "std" ) ) ]
28
28
use core:: { cmp:: Ordering , f32, fmt:: Debug , iter} ;
29
29
30
30
#[ derive( PartialEq , Debug ) ]
Original file line number Diff line number Diff line change 2
2
3
3
use crate :: vertex_id:: VertexId ;
4
4
5
- #[ cfg( not ( feature = "no_std" ) ) ]
5
+ #[ cfg( feature = "std" ) ]
6
6
use std:: fmt:: Debug ;
7
7
8
- #[ cfg( not ( feature = "no_std" ) ) ]
8
+ #[ cfg( feature = "std" ) ]
9
9
use std:: marker:: PhantomData ;
10
10
11
- #[ cfg( feature = "no_std" ) ]
11
+ #[ cfg( not ( feature = "std" ) ) ]
12
12
use core:: marker:: PhantomData ;
13
13
14
- #[ cfg( feature = "no_std" ) ]
14
+ #[ cfg( not ( feature = "std" ) ) ]
15
15
use core:: mem;
16
16
17
- #[ cfg( not ( feature = "no_std" ) ) ]
17
+ #[ cfg( feature = "std" ) ]
18
18
use std:: mem;
19
19
20
- #[ cfg( not ( feature = "no_std" ) ) ]
20
+ #[ cfg( feature = "std" ) ]
21
21
use std:: collections:: VecDeque ;
22
22
23
- #[ cfg( feature = "no_std" ) ]
23
+ #[ cfg( not ( feature = "std" ) ) ]
24
24
use alloc:: collections:: VecDeque ;
25
25
26
26
/// Iterator that owns the data.
Original file line number Diff line number Diff line change @@ -5,13 +5,13 @@ use crate::vertex_id::VertexId;
5
5
6
6
use hashbrown:: HashMap ;
7
7
8
- #[ cfg( feature = "no_std" ) ]
8
+ #[ cfg( not ( feature = "std" ) ) ]
9
9
use alloc:: vec:: Vec ;
10
10
11
- #[ cfg( feature = "no_std" ) ]
11
+ #[ cfg( not ( feature = "std" ) ) ]
12
12
use core:: fmt:: Debug ;
13
13
14
- #[ cfg( not ( feature = "no_std" ) ) ]
14
+ #[ cfg( feature = "std" ) ]
15
15
use std:: fmt:: Debug ;
16
16
17
17
const PANIC_MSG : & str = "graph contains cycle(s)" ;
Original file line number Diff line number Diff line change 1
1
// Copyright 2019 Octavian Oncescu
2
2
3
- #[ cfg( feature = "no_std" ) ]
3
+ #[ cfg( not ( feature = "std" ) ) ]
4
4
extern crate alloc;
5
- #[ cfg( feature = "no_std" ) ]
5
+ #[ cfg( not ( feature = "std" ) ) ]
6
6
use alloc:: boxed:: Box ;
7
7
8
8
/// Generic values Iterator.
Original file line number Diff line number Diff line change 1
1
// Copyright 2019 Octavian Oncescu
2
2
3
3
use crate :: vertex_id:: VertexId ;
4
- #[ cfg( feature = "no_std" ) ]
4
+ #[ cfg( not ( feature = "std" ) ) ]
5
5
use core:: fmt:: Debug ;
6
- #[ cfg( feature = "no_std" ) ]
6
+ #[ cfg( not ( feature = "std" ) ) ]
7
7
extern crate alloc;
8
- #[ cfg( feature = "no_std" ) ]
8
+ #[ cfg( not ( feature = "std" ) ) ]
9
9
use alloc:: boxed:: Box ;
10
- #[ cfg( not ( feature = "no_std" ) ) ]
10
+ #[ cfg( feature = "std" ) ]
11
11
use std:: fmt:: Debug ;
12
12
13
13
pub ( crate ) trait MergedTrait < ' a > : Iterator < Item = & ' a VertexId > + Debug { }
Original file line number Diff line number Diff line change @@ -70,6 +70,6 @@ pub(crate) fn gen_bytes() -> [u8; 16] {
70
70
) ) )
71
71
}
72
72
73
- #[ cfg( feature = "no_std" ) ]
73
+ #[ cfg( not ( feature = "std" ) ) ]
74
74
#[ macro_use]
75
75
extern crate alloc;
You can’t perform that action at this time.
0 commit comments