pub async fn maybe_upgrade_to_self(canister: &mut Canister<'_>, scenario: UpgradeTestingScenario) {
    if UpgradeTestingScenario::Always == scenario {
        canister.upgrade_to_self_binary(Vec::new()).await.unwrap()
    }
}
/// Depending on the testing scenario, upgrade the canister to itself, or do
/// nothing.
///
/// The canister must be controllable by the anonymous user.
Depending on the testing scenario, upgrade the canister to itself, or do
nothing.

The canister must be controllable by the anonymous user.
Depending on the testing scenario upgrade the canister to itself or do nothing . The canister must be controllable by the anonymous user .
pub async fn maybe_upgrade_to_self(canister: &mut Canister<'_>, scenario: UpgradeTestingScenario) {
    if UpgradeTestingScenario::Always == scenario {
        canister.upgrade_to_self_binary(Vec::new()).await.unwrap()
    }
}
pub async fn maybe_upgrade_to_self ( canister : & mut Canister < ' _ > , scenario : UpgradeTestingScenario ) { if UpgradeTestingScenario :: Always == scenario { canister . upgrade_to_self_binary ( Vec :: new ( ) ) . await . unwrap ( ) } }
Depending on the testing scenario, upgrade the canister to itself, or do
nothing.
Depending on the testing scenario upgrade the canister to itself or do nothing .
canister
&mut Canister<'_>
scenario
UpgradeTestingScenario
canister
&mut Canister<'_>
scenario
UpgradeTestingScenario