@@ -31,9 +31,9 @@ fn get_followers_with_aggregation_number(
31
31
aggregation_number : u32 ,
32
32
) -> Vec < TaskId > {
33
33
if is_aggregating_node ( aggregation_number) {
34
- get_many ! ( task, Follower { task } count if count > 0 => task)
34
+ get_many ! ( task, Follower { task } count if * count > 0 => * task)
35
35
} else {
36
- get_many ! ( task, Child { task } => task)
36
+ get_many ! ( task, Child { task } => * task)
37
37
}
38
38
}
39
39
@@ -42,11 +42,11 @@ fn get_followers(task: &TaskGuard<'_>) -> Vec<TaskId> {
42
42
}
43
43
44
44
pub fn get_uppers ( task : & TaskGuard < ' _ > ) -> Vec < TaskId > {
45
- get_many ! ( task, Upper { task } count if count > 0 => task)
45
+ get_many ! ( task, Upper { task } count if * count > 0 => * task)
46
46
}
47
47
48
48
fn iter_uppers < ' a > ( task : & ' a TaskGuard < ' a > ) -> impl Iterator < Item = TaskId > + ' a {
49
- iter_many ! ( task, Upper { task } count if count > 0 => task)
49
+ iter_many ! ( task, Upper { task } count if * count > 0 => * task)
50
50
}
51
51
52
52
pub fn get_aggregation_number ( task : & TaskGuard < ' _ > ) -> u32 {
@@ -126,17 +126,17 @@ impl AggregatedDataUpdate {
126
126
let aggregation = get_aggregation_number ( task) ;
127
127
let mut dirty_container_count = Default :: default ( ) ;
128
128
let mut collectibles_update: Vec < _ > =
129
- get_many ! ( task, Collectible { collectible } => ( collectible, 1 ) ) ;
129
+ get_many ! ( task, Collectible { collectible } => ( * collectible, 1 ) ) ;
130
130
if is_aggregating_node ( aggregation) {
131
131
dirty_container_count = get ! ( task, AggregatedDirtyContainerCount )
132
- . copied ( )
132
+ . cloned ( )
133
133
. unwrap_or_default ( ) ;
134
134
let collectibles = iter_many ! (
135
135
task,
136
136
AggregatedCollectible {
137
137
collectible
138
- } count if count > 0 => {
139
- collectible
138
+ } count if * count > 0 => {
139
+ * collectible
140
140
}
141
141
) ;
142
142
for collectible in collectibles {
@@ -148,7 +148,7 @@ impl AggregatedDataUpdate {
148
148
}
149
149
150
150
let mut result = Self :: new ( ) . collectibles_update ( collectibles_update) ;
151
- if !dirty_container_count. is_default ( ) {
151
+ if !dirty_container_count. is_zero ( ) {
152
152
let DirtyContainerCount {
153
153
count,
154
154
count_in_session,
@@ -170,7 +170,7 @@ impl AggregatedDataUpdate {
170
170
collectibles_update,
171
171
} = & mut self ;
172
172
if let Some ( ( _, value) ) = dirty_container_update. as_mut ( ) {
173
- * value = value. invert ( )
173
+ * value = value. negate ( )
174
174
}
175
175
for ( _, value) in collectibles_update. iter_mut ( ) {
176
176
* value = -* value;
@@ -199,7 +199,7 @@ impl AggregatedDataUpdate {
199
199
} )
200
200
}
201
201
202
- let mut aggregated_update = Default :: default ( ) ;
202
+ let mut aggregated_update = DirtyContainerCount :: default ( ) ;
203
203
update ! (
204
204
task,
205
205
AggregatedDirtyContainer {
@@ -208,7 +208,7 @@ impl AggregatedDataUpdate {
208
208
|old: Option <DirtyContainerCount >| {
209
209
let mut new = old. unwrap_or_default( ) ;
210
210
aggregated_update = new. update_count( count) ;
211
- ( !new. is_default ( ) ) . then_some( new)
211
+ ( !new. is_zero ( ) ) . then_some( new)
212
212
}
213
213
) ;
214
214
@@ -225,10 +225,10 @@ impl AggregatedDataUpdate {
225
225
if let Some ( dirty_state) = dirty_state {
226
226
new. undo_update_with_dirty_state( & dirty_state) ;
227
227
}
228
- if !aggregated_update. is_default ( ) {
228
+ if !aggregated_update. is_zero ( ) {
229
229
result. dirty_container_update = Some ( ( task_id, aggregated_update) ) ;
230
230
}
231
- ( !new. is_default ( ) ) . then_some( new)
231
+ ( !new. is_zero ( ) ) . then_some( new)
232
232
} ) ;
233
233
if let Some ( ( _, count) ) = result. dirty_container_update . as_ref ( ) {
234
234
if count. get ( session_id) < 0 {
@@ -269,8 +269,8 @@ impl AggregatedDataUpdate {
269
269
CollectiblesDependent {
270
270
collectible_type,
271
271
task,
272
- } if collectible_type == ty => {
273
- task
272
+ } if * collectible_type == ty => {
273
+ * task
274
274
}
275
275
) ;
276
276
if !dependent. is_empty ( ) {
@@ -608,7 +608,7 @@ impl AggregationUpdateQueue {
608
608
value : RootState :: new ( ActiveType :: CachedActiveUntilClean , task_id) ,
609
609
} ) ;
610
610
}
611
- let dirty_containers: Vec < _ > = get_many ! ( task, AggregatedDirtyContainer { task } count if count. get( session_id) > 0 => task) ;
611
+ let dirty_containers: Vec < _ > = get_many ! ( task, AggregatedDirtyContainer { task } count if count. get( session_id) > 0 => * task) ;
612
612
if !dirty_containers. is_empty ( ) {
613
613
self . push ( AggregationUpdateJob :: FindAndScheduleDirty {
614
614
task_ids : dirty_containers,
@@ -954,7 +954,7 @@ impl AggregationUpdateQueue {
954
954
if !is_aggregating_node ( old) && is_aggregating_node ( aggregation_number) {
955
955
// When converted from leaf to aggregating node, all children become
956
956
// followers
957
- let children: Vec < _ > = get_many ! ( task, Child { task } => task) ;
957
+ let children: Vec < _ > = get_many ! ( task, Child { task } => * task) ;
958
958
for child_id in children {
959
959
task. add_new ( CachedDataItem :: Follower {
960
960
task : child_id,
@@ -966,7 +966,7 @@ impl AggregationUpdateQueue {
966
966
if is_aggregating_node ( aggregation_number) {
967
967
// followers might become inner nodes when the aggregation number is
968
968
// increased
969
- let followers = iter_many ! ( task, Follower { task } count if count > 0 => task) ;
969
+ let followers = iter_many ! ( task, Follower { task } count if * count > 0 => * task) ;
970
970
for follower_id in followers {
971
971
self . push ( AggregationUpdateJob :: BalanceEdge {
972
972
upper_id : task_id,
@@ -978,7 +978,7 @@ impl AggregationUpdateQueue {
978
978
self . push ( AggregationUpdateJob :: BalanceEdge { upper_id, task_id } ) ;
979
979
}
980
980
} else {
981
- let children = iter_many ! ( task, Child { task } => task) ;
981
+ let children = iter_many ! ( task, Child { task } => * task) ;
982
982
for child_id in children {
983
983
self . push ( AggregationUpdateJob :: UpdateAggregationNumber {
984
984
task_id : child_id,
0 commit comments