@@ -25,7 +25,7 @@ use crate::{
2525 VcValueTrait , VcValueType ,
2626 backend:: {
2727 Backend , CachedTaskType , CellContent , TaskCollectiblesMap , TaskExecutionSpec ,
28- TransientTaskType , TurboTasksExecutionError , TypedCellContent ,
28+ TransientTaskType , TurboTasksExecutionError , TypedCellContent , VerificationMode ,
2929 } ,
3030 capture_future:: CaptureFuture ,
3131 event:: { Event , EventListener } ,
@@ -160,7 +160,7 @@ pub trait TurboTasksApi: TurboTasksCallApi + Sync + Send {
160160 task : TaskId ,
161161 index : CellId ,
162162 content : CellContent ,
163- never_equal : bool ,
163+ verification_mode : VerificationMode ,
164164 ) ;
165165 fn mark_own_task_as_finished ( & self , task : TaskId ) ;
166166 fn set_own_task_aggregation_number ( & self , task : TaskId , aggregation_number : u32 ) ;
@@ -1365,10 +1365,10 @@ impl<B: Backend + 'static> TurboTasksApi for TurboTasks<B> {
13651365 task : TaskId ,
13661366 index : CellId ,
13671367 content : CellContent ,
1368- never_equal : bool ,
1368+ verification_mode : VerificationMode ,
13691369 ) {
13701370 self . backend
1371- . update_task_cell ( task, index, content, never_equal , self ) ;
1371+ . update_task_cell ( task, index, content, verification_mode , self ) ;
13721372 }
13731373
13741374 fn connect_task ( & self , task : TaskId ) {
@@ -1786,7 +1786,7 @@ impl CurrentCellRef {
17861786 self . current_task ,
17871787 self . index ,
17881788 CellContent ( Some ( update) ) ,
1789- false ,
1789+ VerificationMode :: EqualityCheck ,
17901790 )
17911791 }
17921792 }
@@ -1869,7 +1869,7 @@ impl CurrentCellRef {
18691869 }
18701870
18711871 /// Unconditionally updates the content of the cell.
1872- pub fn update < T > ( & self , new_value : T , never_equal : bool )
1872+ pub fn update < T > ( & self , new_value : T , verification_mode : VerificationMode )
18731873 where
18741874 T : VcValueType ,
18751875 {
@@ -1880,7 +1880,7 @@ impl CurrentCellRef {
18801880 CellContent ( Some ( SharedReference :: new ( triomphe:: Arc :: new (
18811881 <T :: Read as VcRead < T > >:: value_to_repr ( new_value) ,
18821882 ) ) ) ) ,
1883- never_equal ,
1883+ verification_mode ,
18841884 )
18851885 }
18861886
@@ -1892,9 +1892,13 @@ impl CurrentCellRef {
18921892 ///
18931893 /// The [`SharedReference`] is expected to use the `<T::Read as
18941894 /// VcRead<T>>::Repr` type for its representation of the value.
1895- pub fn update_with_shared_reference ( & self , shared_ref : SharedReference , never_equal : bool ) {
1895+ pub fn update_with_shared_reference (
1896+ & self ,
1897+ shared_ref : SharedReference ,
1898+ verification_mode : VerificationMode ,
1899+ ) {
18961900 let tt = turbo_tasks ( ) ;
1897- let update = if !never_equal {
1901+ let update = if matches ! ( verification_mode , VerificationMode :: EqualityCheck ) {
18981902 let content = tt
18991903 . read_own_task_cell (
19001904 self . current_task ,
@@ -1920,7 +1924,7 @@ impl CurrentCellRef {
19201924 self . current_task ,
19211925 self . index ,
19221926 CellContent ( Some ( shared_ref) ) ,
1923- never_equal ,
1927+ verification_mode ,
19241928 )
19251929 }
19261930 }
0 commit comments