Skip to content

Commit

Permalink
Do not get argument again unnecessarily in Arguments.Error()
Browse files Browse the repository at this point in the history
  • Loading branch information
TomWright committed Sep 18, 2019
1 parent 85f2b59 commit 7bd76b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mock/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,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 7bd76b0

Please sign in to comment.