Duplicate-key resolution differs between constructors on the same type:
use vecmap::VecMap;
let pairs = vec![("a", 1), ("a", 2), ("a", 3)];
VecMap::from(pairs.clone()).get("a"); // Some(&1) first wins
pairs.clone().into_iter().collect::<VecMap<_, _>>().get("a"); // Some(&3) last wins
VecMap::from([("a", 1), ("a", 2), ("a", 3)]).get("a"); // Some(&3) last wins
VecSet has the analogous split (visible when T's Eq ignores a field).
From<Vec<_>> uses crate::dedup (keeps first); FromIterator / From<[_; N]> go through Extend → insert → mem::replace (keeps last). std's HashMap/BTreeMap uniformly keep the last; HashSet/BTreeSet uniformly keep the first.
Happy to send a PR - probably aligning From<Vec<_>> with FromIterator.
Duplicate-key resolution differs between constructors on the same type:
VecSethas the analogous split (visible whenT'sEqignores a field).From<Vec<_>>usescrate::dedup(keeps first);FromIterator/From<[_; N]>go throughExtend→insert→mem::replace(keeps last).std'sHashMap/BTreeMapuniformly keep the last;HashSet/BTreeSetuniformly keep the first.Happy to send a PR - probably aligning
From<Vec<_>>withFromIterator.