Skip to content

Commit 632a260

Browse files
authored
Merge pull request #820 from TomWright/master
Do not get argument again unnecessarily in Arguments.Error()
2 parents edb8015 + cab2acc commit 632a260

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mock/mock.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,7 @@ func (args Arguments) Error(index int) error {
10921092
return nil
10931093
}
10941094
if s, ok = obj.(error); !ok {
1095-
panic(fmt.Sprintf("assert: arguments: Error(%d) failed because object wasn't correct type: %v", index, args.Get(index)))
1095+
panic(fmt.Sprintf("assert: arguments: Error(%d) failed because object wasn't correct type: %v", index, obj))
10961096
}
10971097
return s
10981098
}

0 commit comments

Comments
 (0)