pub(crate) fn final_mode(self) -> Self {
        // disabled ones can't be "forced", test ones should stay test, no
        // matter what.
        if self == ContractMode::Disabled || self == ContractMode::Test {
            return self;
        }

        if cfg!(feature = "disable_contracts") {
            ContractMode::Disabled
        } else if cfg!(feature = "override_debug") {
            // log is "weaker" than debug, so keep log
            if self == ContractMode::LogOnly {
                self
            } else {
                ContractMode::Debug
            }
        } else if cfg!(feature = "override_log") {
            ContractMode::LogOnly
        } else {
            self
        }
    }
/// Computes the contract type based on feature flags.
Computes the contract type based on feature flags.
Computes the contract type based on feature flags .
pub(crate) fn final_mode(self) -> Self {
        // disabled ones can't be "forced", test ones should stay test, no
        // matter what.
        if self == ContractMode::Disabled || self == ContractMode::Test {
            return self;
        }
        if cfg!(feature = "disable_contracts") {
            ContractMode::Disabled
        } else if cfg!(feature = "override_debug") {
            // log is "weaker" than debug, so keep log
            if self == ContractMode::LogOnly {
                self
            } else {
                ContractMode::Debug
            }
        } else if cfg!(feature = "override_log") {
            ContractMode::LogOnly
        } else {
            self
        }
    }
pub ( crate ) fn final_mode ( self ) -> Self { // disabled ones can't be "forced", test ones should stay test, no // matter what. if self == ContractMode :: Disabled || self == ContractMode :: Test { return self ; } if cfg ! ( feature " " ) { ContractMode :: Disabled } else if cfg ! ( feature " " ) { // log is "weaker" than debug, so keep log if self == ContractMode :: LogOnly { self } else { ContractMode :: Debug } } else if cfg ! ( feature " " ) { ContractMode :: LogOnly } else { self } }
Computes the contract type based on feature flags.
Computes the contract type based on feature flags .
self
self