Merge pull request #820 from TomWright/master

Do not get argument again unnecessarily in Arguments.Error()
pull/1558/head^2
Olivier Mengué 2024-03-06 03:05:06 +01:00 committed by GitHub
commit 632a26080f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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
}