Skip to content

Commit fb95830

Browse files
committed
serde clippy fixes
1 parent ceb4c96 commit fb95830

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/common_traits/serde.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ where
105105
let (depth, value): (usize, V::Item) = x;
106106
if depth != 0 {
107107
return err(format!(
108-
"First element of DepthFirstSequence (root of the tree) must have depth 0; however, received a depth of {}. Following is an example valid sequence of (depth, value) pairs: [[0, 0], [1, 1], [2, 3], [3, 6], [1, 2], [2, 4], [2, 5], [3, 7]].",
109-
depth
108+
"First element of DepthFirstSequence (root of the tree) must have depth 0; however, received a depth of {depth}. Following is an example valid sequence of (depth, value) pairs: [[0, 0], [1, 1], [2, 3], [3, 6], [1, 2], [2, 4], [2, 5], [3, 7]].",
110109
));
111110
}
112111
tree.push_root(value);
@@ -120,8 +119,7 @@ where
120119
true => {
121120
if depth > current_depth + 1 {
122121
return err(format!(
123-
"Let d1 and d2 be two consecutive depths in the depth-first sequence. Then, (i) d2=d1+1, (ii) d2=d1 or (iii) d2<d1 are valid cases. However, received the invalid case where d2>d1+1 (d1={}, d2={}). Please see DepthFirstSequenceError documentation for details. Following is an example valid sequence of (depth, value) pairs: [[0, 0], [1, 1], [2, 3], [3, 6], [1, 2], [2, 4], [2, 5], [3, 7]].",
124-
current_depth, depth
122+
"Let d1 and d2 be two consecutive depths in the depth-first sequence. Then, (i) d2=d1+1, (ii) d2=d1 or (iii) d2<d1 are valid cases. However, received the invalid case where d2>d1+1 (d1={current_depth}, d2={depth}). Please see DepthFirstSequenceError documentation for details. Following is an example valid sequence of (depth, value) pairs: [[0, 0], [1, 1], [2, 3], [3, 6], [1, 2], [2, 4], [2, 5], [3, 7]].",
125123
));
126124
}
127125
}

0 commit comments

Comments
 (0)