tiny.preserves.set
Defined in tiny.preserves.
Makes a set holding a copy of the slice items, sorted in ascending order under compare.
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
| Definitions | 1 |
|---|---|
| Public names | 1 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |