MCPcopy
hub / github.com/google/gvisor / SetRangeUnchecked

Method SetRangeUnchecked

pkg/segment/set.go:1614–1616  ·  view source on GitHub ↗

SetRangeUnchecked mutates the iterated segment's range key. This operation does not invalidate any iterators. Preconditions: - r.Length() > 0. - The new range must not overlap an existing one: - If seg.NextSegment().Ok(), then r.end <= seg.NextSegment().Start(). - If seg.PrevSegment().Ok(), then r.

(r Range)

Source from the content-addressed store, hash-verified

1612// - If seg.NextSegment().Ok(), then r.end <= seg.NextSegment().Start().
1613// - If seg.PrevSegment().Ok(), then r.start >= seg.PrevSegment().End().
1614func (seg Iterator) SetRangeUnchecked(r Range) {
1615 seg.node.keys[seg.index] = r
1616}
1617
1618// SetRange mutates the iterated segment's range key. If the new range would
1619// cause the iterated segment to overlap another segment, or if the new range

Callers 2

SetRangeMethod · 0.95
RemoveMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected