dimforge / dimforge/nalgebra

Consider conversion from borrowed types.

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

Description

The issue is due to sebcrozet/kiss3d#237. Please consider the following impls.

```rust
impl<'a, N, D> From<&'a Point> for Cow<'a, Point>
impl<'a, N, D> From> for Cow<'a, Point>
impl Borrow> for Point
impl<'a, N, D> From<&'a Point> for Point
```

It helps constructing the API without cloning data around. For example, we may have a function call accepting both owned and borrowed types.

```rust
fn add_point<'a>(p: impl Into>>)
```

EDIT: grammar

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.