/// Take an item from the budget. Errors if the budget is exceeded.
Take an item from the budget. Errors if the budget is exceeded.
Take an item from the budget . Errors if the budget is exceeded .
pub(crate) fn take<S>(&mut self, spanned: S) -> Result<(), IrError>
    where
        S: Spanned,
    {
        if self.budget == 0 {
            return Err(IrError::new(spanned, IrErrorKind::BudgetExceeded));
        }
        self.budget -= 1;
        Ok(())
    }
pub ( crate ) fn take < S > ( & mut self , spanned : S ) -> Result < ( ) , IrError > where S : Spanned , { if self . budget == 0 { return Err ( IrError :: new ( spanned , IrErrorKind :: BudgetExceeded ) ) ; } self . budget -= 1 ; Ok ( ( ) ) }
Take an item from the budget.
Take an item from the budget .
&mut self
spanned
S