1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
Index: petgraph/benches/common/factories.rs
===================================================================
--- petgraph.orig/benches/common/factories.rs
+++ petgraph/benches/common/factories.rs
@@ -265,14 +265,17 @@ pub fn digraph() -> GraphFactory<Directe
graph()
}
+#[cfg(feature = "stable_graph")]
pub fn stable_graph<Ty: EdgeType>() -> GraphFactory<Ty, StableGraph<(), (), Ty>> {
GraphFactory::new()
}
+#[cfg(feature = "stable_graph")]
pub fn stable_ungraph() -> GraphFactory<Undirected, StableGraph<(), (), Undirected>> {
stable_graph()
}
+#[cfg(feature = "stable_graph")]
pub fn stable_digraph() -> GraphFactory<Directed, StableGraph<(), (), Directed>> {
stable_graph()
}
Index: petgraph/benches/stable_graph.rs
===================================================================
--- petgraph.orig/benches/stable_graph.rs
+++ petgraph/benches/stable_graph.rs
@@ -1,3 +1,4 @@
+#![cfg(feature = "stable_graph")]
#![feature(test)]
extern crate petgraph;
Index: petgraph/benches/matrix_graph.rs
===================================================================
--- petgraph.orig/benches/matrix_graph.rs
+++ petgraph/benches/matrix_graph.rs
@@ -1,3 +1,4 @@
+#![cfg(feature = "matrix_graph")]
#![feature(test)]
extern crate petgraph;
Index: petgraph/benches/serialize.rs
===================================================================
--- petgraph.orig/benches/serialize.rs
+++ petgraph/benches/serialize.rs
@@ -1,6 +1,6 @@
#![feature(test)]
-#[cfg(feature = "serde-1")]
+#[cfg(all(feature = "serde-1",feature="stable_graph"))]
mod serialize {
extern crate petgraph;
extern crate test;
|