/// Updates the query allocation of the canister after execution.
Updates the query allocation of the canister after execution.
Updates the query allocation of the canister after execution .
pub(crate) fn update_allocation_after_execution(
        &mut self,
        canister: &CanisterState,
        allocation_used: QueryAllocation,
    ) {
        let canister_id = canister.canister_id();
        let current_allocation = match self.allocations.get(&canister_id) {
            None => QueryAllocation::zero(),
            Some(allocation) => *allocation,
        };
        self.allocations
            .insert(canister_id, current_allocation + allocation_used);
    }
pub ( crate ) fn update_allocation_after_execution ( & mut self , canister : & CanisterState , allocation_used : QueryAllocation , ) { let canister_id = canister . canister_id ( ) ; let current_allocation = match self . allocations . get ( & canister_id ) { None => QueryAllocation :: zero ( ) , Some ( allocation ) => * allocation , } ; self . allocations . insert ( canister_id , current_allocation + allocation_used ) ; }
Updates the query allocation of the canister after execution.
Updates the query allocation of the canister after execution .
&mut self
canister
&CanisterState
allocation_used
QueryAllocation