aboutsummaryrefslogtreecommitdiff
path: root/src/transform.rs
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-11-22 07:37:45 +0100
committerMartin Fischer <martin@push-f.com>2021-11-22 07:45:30 +0100
commit99a1e9f42e79a73e7ec3c08eb873d0ef271319d8 (patch)
tree61f8ab5ad1f2cee22f702ddbede95b3f425783f3 /src/transform.rs
parentbacdafb4883d8f8ea06e498285c78f82de9a391b (diff)
support HashSet, BinaryHeap and BTreeSet
Diffstat (limited to 'src/transform.rs')
-rw-r--r--src/transform.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/transform.rs b/src/transform.rs
index 3f1c313..e9da115 100644
--- a/src/transform.rs
+++ b/src/transform.rs
@@ -24,8 +24,13 @@ pub enum TransformError {
fn is_supported_collection(ident: &Ident) -> bool {
// collections added here must implement IntoIterator & FromIterator
- // FromIterator must not require bounds like Eq or Ord since these are Self-referential
- ident == "Vec" || ident == "VecDeque" || ident == "LinkedList"
+ // when adding a type here don't forget to document it in the README
+ ident == "Vec"
+ || ident == "VecDeque"
+ || ident == "LinkedList"
+ || ident == "HashSet"
+ || ident == "BinaryHeap"
+ || ident == "BTreeSet"
}
impl AssocTypeConversions<'_> {