How to implement Vec extend_from_within

⚓ Rust    📅 2026-05-19    👤 surdeus    👁️ 2      

surdeus

I was wondering today how I might improve my current implementation, which just has a loop cloning and pushing elements. Especially, I was thinking about using some kind of low-level byte copy where the element type is Copy and not just Clone. If there a way to test if T is Copy and do it one way, otherwise do it another way?

2 posts - 2 participants

Read full topic

🏷️ Rust_feed