// remove removes e from its list, decrements l.len, and returns e.
15424
func (l *ItemList) remove(e *ItemElement) *ItemElement {
	e.prev.next = e.next
	e.next.prev = e.prev
	e.next = nil // avoid memory leaks
	e.prev = nil // avoid memory leaks
	e.list = nil
	l.len--
	return e
}
575145
func (c *Connector) Remove(ctx context.Context, ei *dosa.EntityInfo, keys map[string]dosa.FieldValue) error {
	if c.isCacheable(ei) {
		w := func() error {
			return c.removeValueFromFallback(ctx, ei, createCacheKey(ei, keys))
		}
		_ = c.cacheWrite(w)
	}

	return c.Next.Remove(ctx, ei, keys)
}
189395
func (s *Set) Remove(item interface{}) {
	s.lock.Lock()
	defer s.lock.Unlock()
	delete(s.items, item)
}
737180
func (s *Set) Remove(key interface{}) (ok bool) {
	_, ok = s.skiplist.Delete(key)
	return ok
}
723924
func (d *Driver) Remove(id string) error {
	return system.EnsureRemoveAll(d.dir(id))
}
1001838
func (l *Lambda) remove(kind, name string, m map[string]interface{}) {
	l.log(kind, name, m, '-', red)
}
467597
func (c *Cache) Remove(u interface{}) (err error) {

	return c.removeNotify(u, false)
}
211674
func list_remove(fnname string, recv_ Value, args Tuple, kwargs []Tuple) (Value, error) {
	recv := recv_.(*List)
	var value Value
	if err := UnpackPositionalArgs(fnname, args, kwargs, 1, &value); err != nil {
		return nil, err
	}
	if err := recv.checkMutable("remove from", true); err != nil {
		return nil, err
	}
	for i, elem := range recv.elems {
		if eq, err := Equal(elem, value); err != nil {
			return nil, fmt.Errorf("remove: %v", err)
		} else if eq {
			recv.elems = append(recv.elems[:i], recv.elems[i+1:]...)
			return None, nil
		}
	}
	return nil, fmt.Errorf("remove: element not found")
}
239763
func (lru *LRUCache) Remove(key interface{}) {
	lru.lock.Lock()
	defer lru.lock.Unlock()

	if element, ok := lru.mapping[key]; ok {
		lru.order.Remove(element)
		delete(lru.mapping, element.Value.(*pair).key)
	}
}
987604
func (l *list) remove(e *element) *element {
	e.prev.next = e.next
	e.next.prev = e.prev
	e.next = nil // avoid memory leaks
	e.prev = nil // avoid memory leaks
	e.list = nil
	l.len--
	return e
}
59585
func (s *OrderedSet) Remove(i string) {
	idx, ok := s.m[i]
	if !ok {
		return
	}

	rest := MinInt(idx+1, len(s.s)-1)

	s.s = append(s.s[:idx], s.s[rest:]...)
	for _, e := range s.s[rest:] {
		s.m[e] = s.m[e] - 1
	}
	delete(s.m, i)
}
641867
func (m *MultiMap) Remove(key interface{}, value interface{}) {
	values, found := m.m[key]
	if found {
		for i, v := range values {
			if v == value {
				m.m[key] = append(values[:i], values[i+1:]...)
			}
		}
	}
	if len(m.m[key]) == 0 {
		delete(m.m, key)
	}
}
264913
func (m *Model) Remove() {
	for _, dir := range m.dirs {
		_ = os.RemoveAll(dir)
	}
}
1042330
func (k *ArrayKeyring) Remove(key string) error {
	delete(k.items, key)
	return nil
}
952369
func Remove(t *Pot, v Val, pof Pof) (*Pot, int, bool) {
	return remove(t, v, pof)
}
1249668
func (b *Bulk) Remove(selectors ...interface{}) {
	action := b.action(bulkRemove)
	for _, selector := range selectors {
		if selector == nil {
			selector = bson.D{}
		}
		action.docs = append(action.docs, &deleteOp{
			Collection: b.c.FullName,
			Selector:   selector,
			Flags:      1,
			Limit:      1,
		})
	}
}
1322598
func (l *segmentList) Remove(e *segment) {
	prev := segmentElementMapper{}.linkerFor(e).Prev()
	next := segmentElementMapper{}.linkerFor(e).Next()

	if prev != nil {
		segmentElementMapper{}.linkerFor(prev).SetNext(next)
	} else {
		l.head = next
	}

	if next != nil {
		segmentElementMapper{}.linkerFor(next).SetPrev(prev)
	} else {
		l.tail = prev
	}
}