mirror of
https://github.com/stretchr/testify.git
synced 2025-07-13 07:39:48 +00:00
Merge pull request #820 from TomWright/master
Do not get argument again unnecessarily in Arguments.Error()
This commit is contained in:
commit
632a26080f
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user