Skip to documentation
SLOP

tiny.preserves.set

Reference tiny.preserves set

Defined in tiny.preserves.

Makes a set holding a copy of the slice items, sorted in ascending order under compare.

No direct callersNo direct callstiny.preservesset
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/preserves/src/any.zig:169

zig
/// Makes a set holding a copy of the slice `items`, sorted in ascending order under `compare`. Code/// that builds a set by hand calls it, so duplicates are refused and the storage comes out sorted./// The duplicate check compares each item with every item before it, so its cost grows with the/// square of the set's size. The copy is one level deep: the set shares everything the items point/// to, and `freeValue` frees exactly the slice. The call returns `error.DuplicateSetElement` before/// it allocates when two items are equal.pub const set = any_constructors.set;

Source: lib/preserves/src/root.zig:198

zig
pub const set = any.set;

Audit

Definitions1
Public names1
Members0
Version26.7.0
Revisiondaab053ee433