4 ms·
sorry, I should have been clear: I meant with a standard lib provided data structure. Thanks!
by throwawaymaths 4y ago
sorry, I should have been clear: I meant with a standard lib provided data structure.
Thanks!
- monocasa 4y agoYes, the data structures in std are parameterized over the allocator, with Global as the default allocator if not specified. https://doc.rust-lang.org/std/vec/struct.Vec.html https://doc.rust-lang.org/std/vec/struct.Vec.html
- throwawaymaths 4y agoThe point is, they are parametrized over a type, not an instance. By contrast, types in zig that are variadic by allocator are (typically) parametrized over instance.