Skip to content

Commit

Permalink
fix: occurences should mutate
Browse files Browse the repository at this point in the history
  • Loading branch information
rvcas committed Sep 6, 2023
1 parent 80c3161 commit 26d802e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,9 @@ type ExBudget struct {
cpu int64
}

func (ex ExBudget) occurrences(n uint32) ExBudget {
return ExBudget{
mem: ex.mem * int64(n),
cpu: ex.cpu * int64(n),
}
func (ex *ExBudget) occurrences(n uint32) {
ex.mem *= int64(n)
ex.cpu *= int64(n)
}

var DefaultExBudget = ExBudget{
Expand Down

0 comments on commit 26d802e

Please sign in to comment.