dimforge / dimforge/nalgebra

Allocator: allocate from failible iterator

Open
#625 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.8k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

`Alocator::allocate_from_iterator` lets us create an allocation from an iterator, but this doesn't work when we want to stop iterator if an error happens. Ideally, there would be a separate method:

```rust
fn try_allocate_from_iterator(nrows: R, ncols: C, iter: I) -> Result
where I: IntoIterator>;
```

This would abort and bubble up the first error from the iterator.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.