Skip to content

Commit

Permalink
Merge pull request #820 from TomWright/master
Browse files Browse the repository at this point in the history
Do not get argument again unnecessarily in Arguments.Error()
  • Loading branch information
dolmen committed Mar 6, 2024
2 parents edb8015 + cab2acc commit 632a260
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mock/mock.go
Expand Up @@ -1092,7 +1092,7 @@ func (args Arguments) Error(index int) error {
return nil
}
if s, ok = obj.(error); !ok {
panic(fmt.Sprintf("assert: arguments: Error(%d) failed because object wasn't correct type: %v", index, args.Get(index)))
panic(fmt.Sprintf("assert: arguments: Error(%d) failed because object wasn't correct type: %v", index, obj))
}
return s
}
Expand Down

0 comments on commit 632a260

Please sign in to comment.