std::vec::ExtractIf has:
impl<T, F> Debug for ExtractIf<'_, T, F>
where
T: Debug,
F: Debug;
std::collections::linked_list::ExtractIf has:
impl<T, F> Debug for ExtractIf<'_, T, F>
where
T: Debug;
std::collections::hash_set::ExtractIf has:
impl<T, F> Debug for ExtractIf<'_, T, F>
where
F: FnMut(&T) -> bool;
std::collections::btree_set::ExtractIf has:
impl<T, F> Debug for ExtractIf<'_, T, F>
where
T: Debug,
F: FnMut(&T) -> bool;
|
Vec |
LinkedList |
HashSet |
BTreeSet |
T: Debug |
☑️ |
☑️ |
|
☑️ |
F: Debug |
☑️ |
|
|
|
F: FnMut |
|
|
☑️ |
☑️ |
There should not need to be 4 different permutations for these 4 effectively-identical interfaces. We should be able to decide:
- Should collection elements be printed or not.
- Should the predicate be printed or not. Almost certainly not, given that closures do not implement Debug.
- Should the Debug impl ever need to invoke the predicate. Almost certainly not.
std::vec::ExtractIfhas:std::collections::linked_list::ExtractIfhas:std::collections::hash_set::ExtractIfhas:std::collections::btree_set::ExtractIfhas:VecLinkedListHashSetBTreeSetT: DebugF: DebugF: FnMutThere should not need to be 4 different permutations for these 4 effectively-identical interfaces. We should be able to decide: