Returns Option>
⚓ Rust 📅 2025-10-31 👤 surdeus 👁️ 7In the last two years, I sometimes saw functions having the return type Option<Vec>. I know that Rust is proud to have the option type, and often its use makes sense. But when the return type is a vector, it can be empty, which is in principle already some form of NONE. So why put an Option on top?
11 posts - 5 participants
🏷️ Rust_feed