Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions dasp_graph/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@

pub use buffer::Buffer;
pub use node::{Input, Node};

// Petgraph's traits appear in the public API of dasp_graph, so re-exporting
// allows the user to be guaranteed that they are using the correct version of
// petgraph, avoiding unintuitive errors like in #176.
pub use petgraph;
use petgraph::data::{DataMap, DataMapMut};
use petgraph::visit::{
Data, DfsPostOrder, GraphBase, IntoNeighborsDirected, NodeCount, NodeIndexable, Reversed,
Expand All @@ -147,9 +152,8 @@ pub mod node;
/// # Example
///
/// ```
/// use dasp_graph::{Node, NodeData};
/// use dasp_graph::{petgraph, Node, NodeData};
/// # use dasp_graph::{Buffer, Input};
/// use petgraph;
/// #
/// # // The node type. (Hint: Use existing node impls by enabling their associated features).
/// # struct MyNode;
Expand Down
6 changes: 4 additions & 2 deletions dasp_graph/tests/graph_send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
#![cfg(feature = "node-boxed")]
#![allow(unreachable_code, unused_variables)]

use dasp_graph::{BoxedNodeSend, NodeData};
use petgraph::visit::GraphBase;
use dasp_graph::{
petgraph::{self, visit::GraphBase},
BoxedNodeSend, NodeData,
};

#[test]
#[should_panic]
Expand Down
6 changes: 4 additions & 2 deletions dasp_graph/tests/graph_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
#![cfg(feature = "node-boxed")]
#![allow(unreachable_code, unused_variables)]

use dasp_graph::{BoxedNode, NodeData};
use petgraph::visit::GraphBase;
use dasp_graph::{
petgraph::{self, visit::GraphBase},
BoxedNode, NodeData,
};

#[test]
#[should_panic]
Expand Down
2 changes: 1 addition & 1 deletion dasp_graph/tests/sum.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![cfg(all(feature = "node-boxed", feature = "node-sum"))]

use dasp_graph::{node, Buffer, Input, Node, NodeData};
use dasp_graph::{node, petgraph, Buffer, Input, Node, NodeData};

type BoxedNode = dasp_graph::BoxedNode;

Expand Down
Loading