3 ms·
Yes, 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/
by monocasa 4y ago
Yes, 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.