| 140 | } |
| 141 | |
| 142 | MutableDict MutableHashTree::getMutableDict(slice key) { |
| 143 | MutableDict result; |
| 144 | insert(key, [&](Value value) -> Value { |
| 145 | auto dict = value.asDict(); |
| 146 | result = dict.asMutable(); |
| 147 | if (!result) |
| 148 | result = dict.mutableCopy(); |
| 149 | return result; |
| 150 | }); |
| 151 | return result; |
| 152 | } |
| 153 | |
| 154 | uint32_t MutableHashTree::writeTo(Encoder &enc) { |
| 155 | if (_root) { |
nothing calls this directly
no test coverage detected