Skip to content

Commit f47aad5

Browse files
committed
Graphs can now be cloned
1 parent 2ba0c0a commit f47aad5

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "graphlib"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
authors = ["Octavian Oncescu <[email protected]>"]
55
edition = "2018"
66
repository = "https://github.com/purpleprotocol/graphlib"

src/edge.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use crate::vertex_id::VertexId;
44
use std::sync::Arc;
55

6-
#[derive(Debug)]
6+
#[derive(Clone, Debug)]
77
pub struct Edge {
88
inbound: Arc<VertexId>,
99
outbound: Arc<VertexId>,

src/graph.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub enum GraphErr {
1212
CannotAddEdge
1313
}
1414

15-
#[derive(Debug)]
15+
#[derive(Clone, Debug)]
1616
pub struct Graph<T> {
1717
vertices: HashMap<Arc<VertexId>, (T, Arc<VertexId>)>,
1818
edges: Vec<Edge>,

0 commit comments

Comments
 (0)