(&mut self, ty: impl ToTokens, bound: impl ToTokens)
| 59 | } |
| 60 | |
| 61 | pub fn insert(&mut self, ty: impl ToTokens, bound: impl ToTokens) { |
| 62 | let ty = ty.to_token_stream(); |
| 63 | let bound = bound.to_token_stream(); |
| 64 | let entry = self.bounds.entry(ty.to_string()); |
| 65 | if let Entry::Vacant(_) = entry { |
| 66 | self.order.push(ty); |
| 67 | } |
| 68 | let (set, tokens) = entry.or_default(); |
| 69 | if set.insert(bound.to_string()) { |
| 70 | tokens.push(bound); |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | pub fn augment_where_clause(&self, generics: &Generics) -> WhereClause { |
| 75 | let mut generics = generics.clone(); |
no outgoing calls
no test coverage detected