fn do_update_settings(
        &self,
        settings: ValidatedCanisterSettings,
        canister: &mut CanisterState,
    ) {
        if let Some(controller_id) = settings.controller {
            canister.system_state.controller = controller_id;
        }
        if let Some(compute_allocation) = settings.compute_allocation {
            canister.scheduler_state.compute_allocation = compute_allocation;
        }
        if let Some(memory_allocation) = settings.memory_allocation {
            canister.system_state.memory_allocation = Some(memory_allocation);
        }
        if let Some(freezing_threshold) = settings.freezing_threshold {
            canister.system_state.freeze_threshold = freezing_threshold;
        }
    }
/// Applies the requested settings on the canister.
/// Note: Called only after validating the settings.
Applies the requested settings on the canister.
Note: Called only after validating the settings.
Applies the requested settings on the canister . Note : Called only after validating the settings .
fn do_update_settings(
        &self,
        settings: ValidatedCanisterSettings,
        canister: &mut CanisterState,
    ) {
        if let Some(controller_id) = settings.controller {
            canister.system_state.controller = controller_id;
        }
        if let Some(compute_allocation) = settings.compute_allocation {
            canister.scheduler_state.compute_allocation = compute_allocation;
        }
        if let Some(memory_allocation) = settings.memory_allocation {
            canister.system_state.memory_allocation = Some(memory_allocation);
        }
        if let Some(freezing_threshold) = settings.freezing_threshold {
            canister.system_state.freeze_threshold = freezing_threshold;
        }
    }
fn do_update_settings ( & self , settings : ValidatedCanisterSettings , canister : & mut CanisterState , ) { if let Some ( controller_id ) = settings . controller { canister . system_state . controller = controller_id ; } if let Some ( compute_allocation ) = settings . compute_allocation { canister . scheduler_state . compute_allocation = compute_allocation ; } if let Some ( memory_allocation ) = settings . memory_allocation { canister . system_state . memory_allocation = Some ( memory_allocation ) ; } if let Some ( freezing_threshold ) = settings . freezing_threshold { canister . system_state . freeze_threshold = freezing_threshold ; } }
Applies the requested settings on the canister.
Applies the requested settings on the canister .
&self
settings
ValidatedCanisterSettings
canister
&mut CanisterState
&self
settings
ValidatedCanisterSettings
canister
&mut CanisterState