pub fn check_condition<E>(condition: bool, err: E) -> ProgramResultwhere
E: Into<ProgramError>,Expand description
Helper: check a condition is true and return an error if not
pub fn check_condition<E>(condition: bool, err: E) -> ProgramResultwhere
E: Into<ProgramError>,Helper: check a condition is true and return an error if not