Comment

Comment by RyanJK5

Yes. duck takes ownership of the vector by moving it into its internal storage.

As a bonus, if you tried passing in an lvalue, it will reject the input unless you add the "copyable" trait, so it ends up mitigating some hidden copies.

parent RyanJK5 3 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton