dbg_pls/impls/std/
collections.rs1use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, LinkedList, VecDeque};
2
3use crate::{DebugPls, Formatter};
4
5impl<K: DebugPls, V: DebugPls, S: ::std::hash::BuildHasher> DebugPls for HashMap<K, V, S> {
6 fn fmt(&self, f: Formatter<'_>) {
7 f.debug_map().entries(self).finish();
8 }
9}
10
11impl<K: DebugPls, V: DebugPls> DebugPls for BTreeMap<K, V> {
12 fn fmt(&self, f: Formatter<'_>) {
13 f.debug_map().entries(self).finish();
14 }
15}
16
17impl<V: DebugPls, S: ::std::hash::BuildHasher> DebugPls for HashSet<V, S> {
18 fn fmt(&self, f: Formatter<'_>) {
19 f.debug_set().entries(self).finish();
20 }
21}
22
23impl<V: DebugPls> DebugPls for BTreeSet<V> {
24 fn fmt(&self, f: Formatter<'_>) {
25 f.debug_set().entries(self).finish();
26 }
27}
28
29impl<D: DebugPls> DebugPls for Vec<D> {
30 fn fmt(&self, f: Formatter<'_>) {
31 f.debug_list().entries(self).finish();
32 }
33}
34
35impl<D: DebugPls> DebugPls for VecDeque<D> {
36 fn fmt(&self, f: Formatter<'_>) {
37 f.debug_list().entries(self).finish();
38 }
39}
40
41impl<D: DebugPls> DebugPls for LinkedList<D> {
42 fn fmt(&self, f: Formatter<'_>) {
43 f.debug_list().entries(self).finish();
44 }
45}
46
47impl<D: DebugPls> DebugPls for BinaryHeap<D> {
48 fn fmt(&self, f: Formatter<'_>) {
49 f.debug_list().entries(self).finish();
50 }
51}