| 130 | } |
| 131 | |
| 132 | void PersistentStore::remove(const StringBox& key, Function<void(Result<Void>)> completion) { |
| 133 | _dispatchQueue->async([key, self = strongRef(this), completion = std::move(completion)]() { |
| 134 | if (self->_store.remove(key)) { |
| 135 | self->scheduleSave(completion); |
| 136 | } else { |
| 137 | completion(Error(STRING_FORMAT("Did not find item '{}'", key))); |
| 138 | } |
| 139 | }); |
| 140 | } |
| 141 | |
| 142 | void PersistentStore::removeAll(Function<void(Result<Void>)> completion) { |
| 143 | _dispatchQueue->async([self = strongRef(this), completion = std::move(completion)]() { |
nothing calls this directly
no test coverage detected