Skip to content

Commit c0cab1c

Browse files
lrvideckisweb-flow
andauthored
do we really need 2 seperate types? (#15)
* do we really need 2 seperate types * fix compile error * [auto-verifier] verify commit 640928b --------- Co-authored-by: Luke Videckis <lukevideckis@gmail.com> Co-authored-by: GitHub <noreply@github.com>
1 parent 395171c commit c0cab1c

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"examples/point_add_range_sum.rs": "2024-05-16 05:51:15 -0600",
3-
"examples/shortest_path.rs": "2024-05-16 05:51:15 -0600",
4-
"examples/staticrmq.rs": "2024-05-16 05:51:15 -0600",
5-
"examples/unionfind.rs": "2024-05-16 05:51:15 -0600"
2+
"examples/point_add_range_sum.rs": "2024-05-16 06:02:48 -0600",
3+
"examples/shortest_path.rs": "2024-05-16 06:02:48 -0600",
4+
"examples/staticrmq.rs": "2024-05-16 06:02:48 -0600",
5+
"examples/unionfind.rs": "2024-05-16 06:02:48 -0600"
66
}

src/fenwick.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ impl<T: Clone + Default + std::ops::AddAssign<T>> Fenwick<T> {
1616
sum
1717
}
1818
/// performs data[idx] += val;
19-
pub fn add<U: Clone>(&mut self, mut idx: usize, val: U)
20-
where
21-
T: std::ops::AddAssign<U>,
22-
{
19+
pub fn add(&mut self, mut idx: usize, val: T) {
2320
while idx < self.ary.len() {
2421
self.ary[idx] += val.clone();
2522
idx |= idx + 1;

0 commit comments

Comments
 (0)