We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ComponentGraph
2 parents 4c4ee64 + 0294632 commit 94c1372Copy full SHA for 94c1372
.github/workflows/ci.yaml
@@ -13,7 +13,7 @@ on:
13
14
jobs:
15
test:
16
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-24.04
17
18
steps:
19
- name: Print environment (debug)
src/graph.rs
@@ -43,5 +43,23 @@ where
43
config: ComponentGraphConfig,
44
}
45
46
+/// Implement `Clone` for `ComponentGraph` when the `Node`s and `Edge`s
47
+/// implement `Clone`.
48
+impl<N, E> Clone for ComponentGraph<N, E>
49
+where
50
+ N: Node + Clone,
51
+ E: Edge + Clone,
52
+{
53
+ fn clone(&self) -> Self {
54
+ Self {
55
+ graph: self.graph.clone(),
56
+ node_indices: self.node_indices.clone(),
57
+ root_id: self.root_id,
58
+ edges: self.edges.clone(),
59
+ config: self.config.clone(),
60
+ }
61
62
+}
63
+
64
#[cfg(test)]
65
mod test_utils;
0 commit comments