Skip to content

Commit fe6fe29

Browse files
committed
Fix lint.
1 parent aeb10d1 commit fe6fe29

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

mp2-v1/src/query/batching_planner.rs

+6-8
Original file line numberDiff line numberDiff line change
@@ -321,15 +321,13 @@ impl<const ARITY: usize> ProvingTree<ARITY> {
321321
let num_childrens = parent_node.children_keys.len();
322322
let new_child_key = parent_key.children_key(num_childrens);
323323
let child_node = ProvingTreeNode {
324-
parent_key: Some(parent_key.clone()),
324+
parent_key: Some(*parent_key),
325325
children_keys: vec![],
326326
};
327327
// insert new child in the set of children of the parent
328-
parent_node.children_keys.push(new_child_key.clone());
328+
parent_node.children_keys.push(new_child_key);
329329
assert!(
330-
self.nodes
331-
.insert(new_child_key.clone(), child_node)
332-
.is_none(),
330+
self.nodes.insert(new_child_key, child_node).is_none(),
333331
"Node with key {:?} already found in the tree",
334332
new_child_key
335333
);
@@ -342,7 +340,7 @@ impl<const ARITY: usize> ProvingTree<ARITY> {
342340
};
343341
let root_key = UTKey((0, 0));
344342
assert!(
345-
self.nodes.insert(root_key.clone(), root).is_none(),
343+
self.nodes.insert(root_key, root).is_none(),
346344
"Error: root node inserted multiple times"
347345
);
348346
root_key
@@ -415,7 +413,7 @@ impl<const ARITY: usize> ProvingTree<ARITY> {
415413
while node_key.is_some() {
416414
// place node key in the path
417415
let key = node_key.unwrap();
418-
path.push(key.clone());
416+
path.push(*key);
419417
// fetch key of the parent node, if any
420418
node_key = self
421419
.nodes
@@ -452,7 +450,7 @@ impl<const NUM_CHUNKS: usize> UTForChunksBuilder<NUM_CHUNKS> {
452450
let path = tree.compute_path_for_leaf(node_index);
453451
(
454452
(
455-
path.last().unwrap().clone(), // chunk node is always a leaf of the tree, so it is the last node
453+
*path.last().unwrap(), // chunk node is always a leaf of the tree, so it is the last node
456454
// in the path
457455
chunk,
458456
),

0 commit comments

Comments
 (0)