Add std.hashset with explicit pure hash/equality policies and complete owning keys. Duplicate/full insert returns the original input, while remove/pop and nonempty free preserve explicit resource ownership. Reuse safe HashMap storage and failure/peak/refund accounting. Integrate normative contracts, RFC, references, complexity measurements, CLI/profile checks and independent Copy/owner set traces. Validation: 973 conformance cases; runtime set GC and schedule stress; unit/Quick Reference, formatting, hosted smoke, 53 CLI checks, 106 source coverage constructs and bundle generation.
947 lines
74 KiB
Rust
947 lines
74 KiB
Rust
// expect: run
|
|
// result: 42
|
|
// phase: 6
|
|
// spec: docs/spec/16-standard-library.md §2.15
|
|
// grant: heap=mem.alloc:512
|
|
// fuel: 2000000
|
|
module test.hashset
|
|
import std.hashset;
|
|
import std.option;
|
|
fn opened<K, H: fn(ref<K>) -> u64 effects [], E: fn(ref<K>,ref<K>) -> bool effects []>(capacity: usize,heap: cap<mem.alloc>) -> std.hashset.HashSet<K,fn H,fn E> effects [mem.alloc] {
|
|
match std.hashset.new::<K,fn H,fn E>(capacity,heap) { std.hashset.NewResult::<K,fn H,fn E>::ok(set) => { return move set; }, std.hashset.NewResult::<K,fn H,fn E>::err(error) => { trap; } }
|
|
}
|
|
fn inserted<K>(result: std.hashset.InsertResult<K>) -> void effects [] {
|
|
match move result { std.hashset.InsertResult::<K>::inserted => {}, std.hashset.InsertResult::<K>::present(key) => { trap; }, std.hashset.InsertResult::<K>::full(key) => { trap; } }
|
|
}
|
|
fn extracted<K>(result: std.option.Option<K>) -> K effects [] { match move result { std.option.Option::<K>::some(key) => { return move key; }, std.option.Option::<K>::none => { trap; } } }
|
|
fn released<K, H: fn(ref<K>) -> u64 effects [], E: fn(ref<K>,ref<K>) -> bool effects []>(set: std.hashset.HashSet<K,fn H,fn E>) -> void effects [] {
|
|
match std.hashset.free::<K,fn H,fn E>(move set) { std.hashset.FreeResult::<K,fn H,fn E>::ok => {}, std.hashset.FreeResult::<K,fn H,fn E>::not_empty(set) => { trap; } }
|
|
}
|
|
struct Key { id: u64, owner: own<u64> }
|
|
fn hash(key: ref<Key>) -> u64 effects [] { return key.id % 3u64; }
|
|
fn equal(a: ref<Key>,b: ref<Key>) -> bool effects [] { return a.id == b.id; }
|
|
fn main(heap: cap<mem.alloc>) -> u64 effects [mem.alloc] {
|
|
let set = opened::<Key,fn hash,fn equal>(2,heap);
|
|
{ mut q = set;
|
|
{
|
|
let query = Key { id: 1,owner: own.new(0u64,heap) or trap };
|
|
match std.hashset.remove::<Key,fn hash,fn equal>(q,ref query) { std.option.Option::<Key>::some(key) => { trap; }, std.option.Option::<Key>::none => { } }
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 0usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.pop::<Key,fn hash,fn equal>(q) { std.option.Option::<Key>::some(key) => { trap; }, std.option.Option::<Key>::none => { } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 0usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let incoming = Key { id: 2,owner: own.new(3u64,heap) or trap };
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,move incoming) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.pop::<Key,fn hash,fn equal>(q) { std.option.Option::<Key>::some(key) => { let (id,owner) = struct.unpack(move key); assert(id == 2u64); assert(own.take(move owner) == 3u64); }, std.option.Option::<Key>::none => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 0usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let incoming = Key { id: 2,owner: own.new(5u64,heap) or trap };
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,move incoming) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.pop::<Key,fn hash,fn equal>(q) { std.option.Option::<Key>::some(key) => { let (id,owner) = struct.unpack(move key); assert(id == 2u64); assert(own.take(move owner) == 5u64); }, std.option.Option::<Key>::none => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 0usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let incoming = Key { id: 3,owner: own.new(7u64,heap) or trap };
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,move incoming) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let query = Key { id: 0,owner: own.new(0u64,heap) or trap };
|
|
match std.hashset.remove::<Key,fn hash,fn equal>(q,ref query) { std.option.Option::<Key>::some(key) => { trap; }, std.option.Option::<Key>::none => { } }
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let incoming = Key { id: 2,owner: own.new(9u64,heap) or trap };
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,move incoming) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let incoming = Key { id: 1,owner: own.new(10u64,heap) or trap };
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,move incoming) { std.hashset.InsertResult::<Key>::inserted => { trap; }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { let (id,owner) = struct.unpack(move key); assert(id == 1u64); assert(own.take(move owner) == 10u64); } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let incoming = Key { id: 3,owner: own.new(11u64,heap) or trap };
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,move incoming) { std.hashset.InsertResult::<Key>::inserted => { trap; }, std.hashset.InsertResult::<Key>::present(key) => { let (id,owner) = struct.unpack(move key); assert(id == 3u64); assert(own.take(move owner) == 11u64); }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let incoming = Key { id: 0,owner: own.new(12u64,heap) or trap };
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,move incoming) { std.hashset.InsertResult::<Key>::inserted => { trap; }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { let (id,owner) = struct.unpack(move key); assert(id == 0u64); assert(own.take(move owner) == 12u64); } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.pop::<Key,fn hash,fn equal>(q) { std.option.Option::<Key>::some(key) => { let (id,owner) = struct.unpack(move key); assert(id == 2u64); assert(own.take(move owner) == 9u64); }, std.option.Option::<Key>::none => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let incoming = Key { id: 18446744073709551615,owner: own.new(14u64,heap) or trap };
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,move incoming) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let query = Key { id: 0,owner: own.new(0u64,heap) or trap };
|
|
match std.hashset.remove::<Key,fn hash,fn equal>(q,ref query) { std.option.Option::<Key>::some(key) => { trap; }, std.option.Option::<Key>::none => { } }
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let incoming = Key { id: 1,owner: own.new(16u64,heap) or trap };
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,move incoming) { std.hashset.InsertResult::<Key>::inserted => { trap; }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { let (id,owner) = struct.unpack(move key); assert(id == 1u64); assert(own.take(move owner) == 16u64); } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let incoming = Key { id: 0,owner: own.new(17u64,heap) or trap };
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,move incoming) { std.hashset.InsertResult::<Key>::inserted => { trap; }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { let (id,owner) = struct.unpack(move key); assert(id == 0u64); assert(own.take(move owner) == 17u64); } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let incoming = Key { id: 2,owner: own.new(18u64,heap) or trap };
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,move incoming) { std.hashset.InsertResult::<Key>::inserted => { trap; }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { let (id,owner) = struct.unpack(move key); assert(id == 2u64); assert(own.take(move owner) == 18u64); } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let incoming = Key { id: 3,owner: own.new(19u64,heap) or trap };
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,move incoming) { std.hashset.InsertResult::<Key>::inserted => { trap; }, std.hashset.InsertResult::<Key>::present(key) => { let (id,owner) = struct.unpack(move key); assert(id == 3u64); assert(own.take(move owner) == 19u64); }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 2usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.reserve::<Key,fn hash,fn equal>(q,3usize,heap) { std.hashset.ReserveResult::ok => {}, std.hashset.ReserveResult::err(error) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let incoming = Key { id: 18446744073709551615,owner: own.new(21u64,heap) or trap };
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,move incoming) { std.hashset.InsertResult::<Key>::inserted => { trap; }, std.hashset.InsertResult::<Key>::present(key) => { let (id,owner) = struct.unpack(move key); assert(id == 18446744073709551615u64); assert(own.take(move owner) == 21u64); }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let incoming = Key { id: 0,owner: own.new(22u64,heap) or trap };
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,move incoming) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 3usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap };
|
|
match std.hashset.remove::<Key,fn hash,fn equal>(q,ref query) { std.option.Option::<Key>::some(key) => { let (id,owner) = struct.unpack(move key); assert(id == 18446744073709551615u64); assert(own.take(move owner) == 14u64); }, std.option.Option::<Key>::none => { trap; } }
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.pop::<Key,fn hash,fn equal>(q) { std.option.Option::<Key>::some(key) => { let (id,owner) = struct.unpack(move key); assert(id == 0u64); assert(own.take(move owner) == 22u64); }, std.option.Option::<Key>::none => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let query = Key { id: 2,owner: own.new(0u64,heap) or trap };
|
|
match std.hashset.remove::<Key,fn hash,fn equal>(q,ref query) { std.option.Option::<Key>::some(key) => { trap; }, std.option.Option::<Key>::none => { } }
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let incoming = Key { id: 18446744073709551615,owner: own.new(26u64,heap) or trap };
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,move incoming) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.reserve::<Key,fn hash,fn equal>(q,3usize,heap) { std.hashset.ReserveResult::ok => {}, std.hashset.ReserveResult::err(error) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.pop::<Key,fn hash,fn equal>(q) { std.option.Option::<Key>::some(key) => { let (id,owner) = struct.unpack(move key); assert(id == 18446744073709551615u64); assert(own.take(move owner) == 26u64); }, std.option.Option::<Key>::none => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 1usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let incoming = Key { id: 2,owner: own.new(29u64,heap) or trap };
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,move incoming) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let incoming = Key { id: 1,owner: own.new(30u64,heap) or trap };
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,move incoming) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 3usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let incoming = Key { id: 18446744073709551615,owner: own.new(31u64,heap) or trap };
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,move incoming) { std.hashset.InsertResult::<Key>::inserted => { trap; }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { let (id,owner) = struct.unpack(move key); assert(id == 18446744073709551615u64); assert(own.take(move owner) == 31u64); } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 3usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let query = Key { id: 7,owner: own.new(0u64,heap) or trap };
|
|
match std.hashset.remove::<Key,fn hash,fn equal>(q,ref query) { std.option.Option::<Key>::some(key) => { trap; }, std.option.Option::<Key>::none => { } }
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 3usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let incoming = Key { id: 1,owner: own.new(33u64,heap) or trap };
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,move incoming) { std.hashset.InsertResult::<Key>::inserted => { trap; }, std.hashset.InsertResult::<Key>::present(key) => { let (id,owner) = struct.unpack(move key); assert(id == 1u64); assert(own.take(move owner) == 33u64); }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 3usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let incoming = Key { id: 7,owner: own.new(34u64,heap) or trap };
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,move incoming) { std.hashset.InsertResult::<Key>::inserted => { trap; }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { let (id,owner) = struct.unpack(move key); assert(id == 7u64); assert(own.take(move owner) == 34u64); } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 3usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.reserve::<Key,fn hash,fn equal>(q,2usize,heap) { std.hashset.ReserveResult::ok => {}, std.hashset.ReserveResult::err(error) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 3usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.pop::<Key,fn hash,fn equal>(q) { std.option.Option::<Key>::some(key) => { let (id,owner) = struct.unpack(move key); assert(id == 1u64); assert(own.take(move owner) == 30u64); }, std.option.Option::<Key>::none => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 3usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
match std.hashset.reserve::<Key,fn hash,fn equal>(q,4usize,heap) { std.hashset.ReserveResult::ok => {}, std.hashset.ReserveResult::err(error) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 4usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let incoming = Key { id: 1,owner: own.new(38u64,heap) or trap };
|
|
match std.hashset.insert::<Key,fn hash,fn equal>(q,move incoming) { std.hashset.InsertResult::<Key>::inserted => { }, std.hashset.InsertResult::<Key>::present(key) => { trap; }, std.hashset.InsertResult::<Key>::full(key) => { trap; } }
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 3usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 4usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let query = Key { id: 3,owner: own.new(0u64,heap) or trap };
|
|
match std.hashset.remove::<Key,fn hash,fn equal>(q,ref query) { std.option.Option::<Key>::some(key) => { let (id,owner) = struct.unpack(move key); assert(id == 3u64); assert(own.take(move owner) == 7u64); }, std.option.Option::<Key>::none => { trap; } }
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 4usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{
|
|
let query = Key { id: 7,owner: own.new(0u64,heap) or trap };
|
|
match std.hashset.remove::<Key,fn hash,fn equal>(q,ref query) { std.option.Option::<Key>::some(key) => { trap; }, std.option.Option::<Key>::none => { } }
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
assert(std.hashset.len::<Key,fn hash,fn equal>(ref q) == 2usize); assert(std.hashset.capacity::<Key,fn hash,fn equal>(ref q) == 4usize);
|
|
{ let query = Key { id: 0,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 1,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 2,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == true);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 3,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 7,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
{ let query = Key { id: 18446744073709551615,owner: own.new(0u64,heap) or trap }; assert(std.hashset.contains::<Key,fn hash,fn equal>(ref q,ref query) == false);
|
|
let (id,owner) = struct.unpack(move query); assert(own.take(move owner) == 0u64);
|
|
}
|
|
}
|
|
{ let key = extracted::<Key>(std.hashset.pop::<Key,fn hash,fn equal>(q)); let (id,owner) = struct.unpack(move key); assert(id == 2u64); assert(own.take(move owner) == 29u64); }
|
|
{ let key = extracted::<Key>(std.hashset.pop::<Key,fn hash,fn equal>(q)); let (id,owner) = struct.unpack(move key); assert(id == 1u64); assert(own.take(move owner) == 38u64); }
|
|
} released::<Key,fn hash,fn equal>(move set); return 42;
|
|
}
|