Skip to content

Commit

Permalink
Remove unnecessary CanInterface() check.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalloc committed Aug 20, 2024
1 parent 0f6fdef commit 08270b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,14 @@ func (t *Test) Expect(act Action, e Expectation) *Test {
options,
dapper.WithAnnotator(
func(v dapper.Value) string {
// Check that the types are EXACT, otherwise the annotation
// can be duplicated, for example, once when boxed in an
// interface, and again when descending into that boxed
// value.
if rt != v.Value.Type() {
return ""
}

if !v.Value.CanInterface() {
return ""
}

if !equal(a.Value, v.Value.Interface()) {
return ""
}
Expand Down

0 comments on commit 08270b5

Please sign in to comment.