// IsEqual test whether s and t are the same in size and have the same items.
425631
func (s *set) IsEqual(t Interface) bool {
	// Force locking only if given set is threadsafe.
	if conv, ok := t.(*Set); ok {
		conv.l.RLock()
		defer conv.l.RUnlock()
	}

	// return false if they are no the same size
	if sameSize := len(s.m) == t.Size(); !sameSize {
		return false
	}

	equal := true
	t.Each(func(item interface{}) bool {
		_, equal = s.m[item]
		return equal // if false, Each() will end
	})

	return equal
}
934708
func (a *VaultConfig) IsEqual(b *VaultConfig) bool {
	if a == nil && b != nil {
		return false
	}
	if a != nil && b == nil {
		return false
	}

	if a.Token != b.Token {
		return false
	}
	if a.Role != b.Role {
		return false
	}
	if a.TaskTokenTTL != b.TaskTokenTTL {
		return false
	}
	if a.Addr != b.Addr {
		return false
	}
	if a.ConnectionRetryIntv.Nanoseconds() != b.ConnectionRetryIntv.Nanoseconds() {
		return false
	}
	if a.TLSCaFile != b.TLSCaFile {
		return false
	}
	if a.TLSCaPath != b.TLSCaPath {
		return false
	}
	if a.TLSCertFile != b.TLSCertFile {
		return false
	}
	if a.TLSKeyFile != b.TLSKeyFile {
		return false
	}
	if a.TLSServerName != b.TLSServerName {
		return false
	}
	if a.AllowUnauthenticated != b.AllowUnauthenticated {
		return false
	}
	if a.TLSSkipVerify != b.TLSSkipVerify {
		return false
	}
	if a.Enabled != b.Enabled {
		return false
	}
	return true
}
30346
func (s Slice) IsEqualString(value string) (bool, error) {
	k, err := s.GetStringUTF8()
	if err != nil {
		return false, WithStack(err)
	}
	rc := bytes.Compare(k, []byte(value))
	return rc == 0, nil
}
1300758
func typeEqual(t1, t2 tomlType) bool {
	if t1 == nil || t2 == nil {
		return false
	}
	return t1.typeString() == t2.typeString()
}
839985
func (spec *SampleSpec) Equal(other *SampleSpec) bool {
	if C.pa_sample_spec_equal(spec.toC(), other.toC()) == 0 {
		return false
	}
	return true
}
85231
func (e *element) isEqual(e2 *element) bool {
	return (e.index == e2.index) &&
		(&e.hash).IsEqual(&e2.hash)
}
233710
func (expr *Expr) IsEquality() bool {
	terms, ok := expr.Terms.([]*Term)
	if !ok {
		return false
	}
	return terms[0].Value.Compare(Equality.Ref()) == 0
}
681827
func (q Query) SequenceEqual(q2 Query) bool {
	next := q.Iterate()
	next2 := q2.Iterate()

	for item, ok := next(); ok; item, ok = next() {
		item2, ok2 := next2()
		if !ok2 || item != item2 {
			return false
		}
	}

	_, ok2 := next2()
	return !ok2
}
1009839
func (i InventoryIndex) FieldsEqual(fields []string) bool {
	return stringSliceEqualsIgnoreOrder(i.Fields, fields)
}
1056373
func QueryResponsesEqual(r1, r2 []QueryResponse) bool {
	if len(r1) != len(r2) {
		return false
	}
	for i, r := range r1 {
		if !r.QueryResult.Equal(r2[i].QueryResult) {
			return false
		}
		if !vterrors.Equals(r.QueryError, r2[i].QueryError) {
			return false
		}
	}
	return true
}
264996
func (s *Sample) Equal(o *Sample) bool {
	if s == o {
		return true
	}

	if !s.Metric.Equal(o.Metric) {
		return false
	}
	if !s.Timestamp.Equal(o.Timestamp) {
		return false
	}

	return s.Value.Equal(o.Value)
}
1023199
func (pg *GoEvtxMap) AnyEqual(path *GoEvtxPath, is []interface{}) bool {
	t, err := pg.Get(path)
	if err != nil {
		return false
	}
	for _, i := range is {
		if reflect.DeepEqual(i, *t) {
			return true
		}
	}
	return false
}
824157
func (p *PublicKey) IsEqual(otherPubKey *PublicKey) bool {
	return p.X.Cmp(otherPubKey.X) == 0 &&
		p.Y.Cmp(otherPubKey.Y) == 0
}
799224
func StringsEqual(expected string, other string, errMsg string) error {
	if expected != other {
		if errMsg == "" {
			errMsg = fmt.Sprintf("expected %s found %s", expected, other)
		}
		return NewViolation(errMsg)
	}
	return nil
}
842816
func (a *ProposalInfo) IsEqual(b *ProposalInfo) bool {
	if a.CensorshipRecord != b.CensorshipRecord || a.Name != b.Name || a.State != b.State ||
		a.NumComments != b.NumComments || a.StatusChangeMsg != b.StatusChangeMsg ||
		a.Status != b.Status || a.Timestamp != b.Timestamp || a.Token != b.Token ||
		a.CensoredDate != b.CensoredDate || a.AbandonedDate != b.AbandonedDate ||
		a.VoteStatus != b.VoteStatus || a.TotalVotes != b.TotalVotes ||
		a.PublishedDate != b.PublishedDate || len(a.VoteResults) != len(b.VoteResults) {
		return false
	}
	return true
}
622556
func (e *Invocation) isEqual(other *Invocation) bool {
	return e == other || (e.ID == other.ID &&
		e.MutationsCount == other.MutationsCount && // compare it first, it changes most often
		e.JobID == other.JobID &&
		e.IndexedJobID == other.IndexedJobID &&
		e.Started.Equal(other.Started) &&
		e.Finished.Equal(other.Finished) &&
		e.TriggeredBy == other.TriggeredBy &&
		bytes.Equal(e.PropertiesRaw, other.PropertiesRaw) &&
		equalSortedLists(e.Tags, other.Tags) &&
		bytes.Equal(e.IncomingTriggersRaw, other.IncomingTriggersRaw) &&
		bytes.Equal(e.OutgoingTriggersRaw, other.OutgoingTriggersRaw) &&
		bytes.Equal(e.PendingTimersRaw, other.PendingTimersRaw) &&
		e.Revision == other.Revision &&
		e.RevisionURL == other.RevisionURL &&
		bytes.Equal(e.Task, other.Task) &&
		equalSortedLists(e.TriggeredJobIDs, other.TriggeredJobIDs) &&
		e.DebugLog == other.DebugLog &&
		e.RetryCount == other.RetryCount &&
		e.Status == other.Status &&
		e.ViewURL == other.ViewURL &&
		bytes.Equal(e.TaskData, other.TaskData))
}
557075
func ColorEqual(a, b Color) bool {
	return a.Hue == b.Hue &&
		a.Saturation == b.Saturation &&
		a.Brightness == b.Brightness &&
		a.Kelvin == b.Kelvin
}