MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / try_collect

Function try_collect

atomic-core/src/pristine/txn/helpers.rs:208–212  ·  view source on GitHub ↗
(
    results: impl IntoIterator<Item = Result<T, E>>,
)

Source from the content-addressed store, hash-verified

206// Fallible iterator helpers
207
208pub(crate) fn try_collect<T, E>(
209 results: impl IntoIterator<Item = Result<T, E>>,
210) -> Result<Vec<T>, E> {
211 results.into_iter().collect()
212}
213
214pub(crate) fn collect_until_error<T, E>(
215 results: impl IntoIterator<Item = Result<T, E>>,

Callers 4

iter_adjacentMethod · 0.85
init_inode_adjMethod · 0.85
iter_adjacentMethod · 0.85

Calls 2

collectMethod · 0.45
into_iterMethod · 0.45

Tested by 1