Skip to content

Commit 874b998

Browse files
authored
add take_resources() for InMemoryResourceStorage (#548)
1 parent 744a924 commit 874b998

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/resources/resource_storage.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ impl InMemoryResourceStorage {
170170
self.resources.insert(resource.name, resource_impl);
171171
Ok(())
172172
}
173+
174+
pub fn take_resources(&mut self) -> HashMap<String, ResourceImpl> {
175+
std::mem::take(&mut self.resources)
176+
}
173177
}
174178

175179
/// Formats `arg` such that it either is a JSON string, or is safe to insert within a JSON string,

0 commit comments

Comments
 (0)