Comment

Comment by shim__

DerefMut would allow you to call `clear()` on `v` violating the invariant

I'd be great is there were a way to shadow methods but even then guarantees would be poor since Vec might add a new method in the future which isn't covered by invariant checks

parent shim__ 1 month ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton