You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to dedup a Vec of structs using a property of the struct. I do not want to map since I want to maintain the contents of the Vec. The stdlib Vec can sort_by using a comparator F: FnMut(&T, &T) -- it would be consistent for Vec to dedup_by using the same kind of comparator.
I would like to dedup a
Vec
of structs using a property of the struct. I do not want tomap
since I want to maintain the contents of the Vec. The stdlib Vec cansort_by
using a comparatorF: FnMut(&T, &T)
-- it would be consistent for Vec todedup_by
using the same kind of comparator.My contrived example:
The text was updated successfully, but these errors were encountered: