Merge pull request #55 from google/apply-bool

Remove useless return value from applicableOption.apply
diff --git a/cmp/compare.go b/cmp/compare.go
index b180917..143407c 100644
--- a/cmp/compare.go
+++ b/cmp/compare.go
@@ -304,7 +304,8 @@
 
 	// Evaluate all filters and apply the remaining options.
 	if opt := opts.filter(s, vx, vy, t); opt != nil {
-		return opt.apply(s, vx, vy)
+		opt.apply(s, vx, vy)
+		return true
 	}
 	return false
 }
diff --git a/cmp/options.go b/cmp/options.go
index c19fbc7..885efc8 100644
--- a/cmp/options.go
+++ b/cmp/options.go
@@ -38,9 +38,8 @@
 type applicableOption interface {
 	Option
 
-	// apply executes the option and reports whether the option was applied.
-	// Each option may mutate s.
-	apply(s *state, vx, vy reflect.Value) bool
+	// apply executes the option, which may mutate s or panic.
+	apply(s *state, vx, vy reflect.Value)
 }
 
 // coreOption represents the following types:
@@ -85,7 +84,7 @@
 	return out
 }
 
-func (opts Options) apply(s *state, _, _ reflect.Value) bool {
+func (opts Options) apply(s *state, _, _ reflect.Value) {
 	const warning = "ambiguous set of applicable options"
 	const help = "consider using filters to ensure at most one Comparer or Transformer may apply"
 	var ss []string
@@ -196,7 +195,7 @@
 
 func (ignore) isFiltered() bool                                                     { return false }
 func (ignore) filter(_ *state, _, _ reflect.Value, _ reflect.Type) applicableOption { return ignore{} }
-func (ignore) apply(_ *state, _, _ reflect.Value) bool                              { return true }
+func (ignore) apply(_ *state, _, _ reflect.Value)                                   { return }
 func (ignore) String() string                                                       { return "Ignore()" }
 
 // invalid is a sentinel Option type to indicate that some options could not
@@ -204,7 +203,7 @@
 type invalid struct{ core }
 
 func (invalid) filter(_ *state, _, _ reflect.Value, _ reflect.Type) applicableOption { return invalid{} }
-func (invalid) apply(s *state, _, _ reflect.Value) bool {
+func (invalid) apply(s *state, _, _ reflect.Value) {
 	const help = "consider using AllowUnexported or cmpopts.IgnoreUnexported"
 	panic(fmt.Sprintf("cannot handle unexported field: %#v\n%s", s.curPath, help))
 }
@@ -265,7 +264,7 @@
 	return nil
 }
 
-func (tr *transformer) apply(s *state, vx, vy reflect.Value) bool {
+func (tr *transformer) apply(s *state, vx, vy reflect.Value) {
 	// Update path before calling the Transformer so that dynamic checks
 	// will use the updated path.
 	s.curPath.push(&transform{pathStep{tr.fnc.Type().Out(0)}, tr})
@@ -274,7 +273,6 @@
 	vx = s.callTRFunc(tr.fnc, vx)
 	vy = s.callTRFunc(tr.fnc, vy)
 	s.compareAny(vx, vy)
-	return true
 }
 
 func (tr transformer) String() string {
@@ -320,10 +318,9 @@
 	return nil
 }
 
-func (cm *comparer) apply(s *state, vx, vy reflect.Value) bool {
+func (cm *comparer) apply(s *state, vx, vy reflect.Value) {
 	eq := s.callTTBFunc(cm.fnc, vx, vy)
 	s.report(eq, vx, vy)
-	return true
 }
 
 func (cm comparer) String() string {